/** * Removes a root from the cache. * * @param root path to be removed */ static synchronized void removeRoot(String root) { RootCache cache = RootCache.getInstance(); if (cache.isRoot(root)) { cache.removeRoot(root); notifyListeners(FileSystemListener.ROOT_REMOVED, root); } }
/** * Adds a root to the cache. * * @param root path to add to roots */ static synchronized void addRoot(String root) { RootCache cache = RootCache.getInstance(); if (!cache.isRoot(root)) { cache.addRoot(root); notifyListeners(FileSystemListener.ROOT_ADDED, root); } }