/** * Get the children * * @param filter to filter the children * @return the children * @throws IOException for any problem accessing the virtual file system * @throws IllegalStateException if the file is closed or it is a leaf node */ public List<VirtualFile> getChildren(VirtualFileFilter filter) throws IOException { // isDirectory does the read security check if (!isDirectory()) { return Collections.emptyList(); } if (filter == null) { filter = MatchAllVirtualFileFilter.INSTANCE; } FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, null); visit(visitor); return visitor.getMatched(); }
/** * Get all the children recursively<p> * <p/> * This always uses {@link VisitorAttributes#RECURSE} * * @param filter to filter the children * @return the children * @throws IOException for any problem accessing the virtual file system * @throws IllegalStateException if the file is closed or it is a leaf node */ public List<VirtualFile> getChildrenRecursively(VirtualFileFilter filter) throws IOException { // isDirectory does the read security check if (!isDirectory()) { return Collections.emptyList(); } if (filter == null) { filter = MatchAllVirtualFileFilter.INSTANCE; } FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, VisitorAttributes.RECURSE); visit(visitor); return visitor.getMatched(); }
for (VirtualFile dir : visitor.getMatched()) { index.add(dir.getPathNameRelativeTo(root));
for (VirtualFile dir : visitor.getMatched()) { index.add(dir.getPathNameRelativeTo(root));
for (VirtualFile dir : visitor.getMatched()) { index.add(dir.getPathNameRelativeTo(root));
for (VirtualFile dir : visitor.getMatched()) { index.add(dir.getPathNameRelativeTo(root));
for (VirtualFile dir : visitor.getMatched()) { index.add(dir.getPathNameRelativeTo(root));
final List<VirtualFile> matches = visitor.getMatched(); final List<org.jboss.ejb3.vfs.spi.VirtualFile> wrappedMatches = new ArrayList<org.jboss.ejb3.vfs.spi.VirtualFile>(matches.size()); for(VirtualFile match : matches)