private void removeDescendants(VirtualFile file, VirtualFilePointerContainer container) { for (VirtualFile virtualFile : container.getFiles()) { if (VfsUtil.isAncestor(file, virtualFile, false)) { container.remove(myPointerManager.create(virtualFile, this, null)); } } }
@Override public boolean removeRoot(@NotNull String url, @NotNull OrderRootType rootType) { assert !isDisposed(); LOG.assertTrue(isWritable()); final VirtualFilePointerContainer container = myRoots.get(rootType); final VirtualFilePointer byUrl = container.findByUrl(url); if (byUrl != null) { container.remove(byUrl); myJarDirectories.remove(rootType, url); return true; } return false; }