public VisitorAttributes getAttributes() { VisitorAttributes attributes = new VisitorAttributes(); attributes.setIncludeRoot(true); attributes.setRecurseFilter(this); return attributes; }
public VisitorAttributes getAttributes() { VisitorAttributes attributes = new VisitorAttributes(); attributes.setIncludeRoot(false); attributes.setRecurseFilter(this); return attributes; }
public VisitorAttributes getAttributes() { VisitorAttributes attributes = new VisitorAttributes(); attributes.setIncludeRoot(true); attributes.setRecurseFilter(new NoChildFilter()); return attributes; }
/** * Create a new VFSFindEntriesEnumeration. * * @param root the root file * @param file the file to enumerate * @param filePattern the file pattern * @param recurse whether to recurse * @throws IOException for any error */ public VFSFindEntriesEnumeration(VirtualFile root, VirtualFile file, String filePattern, boolean recurse) throws IOException { if (root == null) throw MESSAGES.illegalArgumentNull("root"); if (file == null) throw MESSAGES.illegalArgumentNull("file"); String rootPath = root.getPathName(); VisitorAttributes attributes = new VisitorAttributes(); attributes.setIncludeRoot(false); attributes.setLeavesOnly(false); if (recurse) attributes.setRecurseFilter(MatchAllVirtualFileFilter.INSTANCE); VisitorImpl visitor = new VisitorImpl(rootPath, filePattern, attributes); file.visit(visitor); this.paths = visitor.paths.iterator(); }