List of utility methods to do Recursive List
File[] | recursiveList(File dir, FilenameFilter filter) recursive List Vector v = new Vector(); addRecursiveList(dir, filter, v); File[] files = new File[v.size()]; v.copyInto(files); return files; |
List | recursiveListFile(File folder) recursive List File return recursiveListFile(folder, "", f -> true); |
List | recursiveListFiles(File baseDir, final FileFilter filter) recursive List Files FileFilter dirFilter = new FileFilter() { public boolean accept(File pathname) { return pathname.isDirectory() || filter.accept(pathname); }; File[] fileArray = baseDir.listFiles(dirFilter); List<File> files = new ArrayList<File>(fileArray.length); for (int i = 0; i < fileArray.length; i++) { ... |
File[] | recursiveListFiles(File dir, FileFilter filter) recursive List Files if (!dir.isDirectory()) throw new IllegalArgumentException(dir + " is not a directory"); List<File> fileList = new ArrayList<File>(); recursiveListFilesHelper(dir, filter, fileList); return fileList.toArray(new File[fileList.size()]); |
void | recursiveListFiles(File file, List recursive List Files for (File f : file.listFiles()) { if (f.isDirectory()) { recursiveListFiles(f, files); files.add(f); |
List | recursiveListFiles(String path) recursive List Files List<File> result = new ArrayList<File>(Arrays.asList(new File(path).listFiles())); for (File f : new File(path).listFiles()) if (f.isDirectory()) result.addAll(recursiveListFiles(f.getAbsolutePath())); return result; |
void | recursiveListFilesHelper(File dir, FileFilter filter, List recursive List Files Helper for (File f : dir.listFiles()) { if (f.isDirectory()) { recursiveListFilesHelper(f, filter, fileList); } else { if (filter.accept(f)) fileList.add(f); |
void | recursiveListint(List If the parameter file is a file then it is added to the list of files. if (file.isFile()) { list.add(file); } else { File[] children = null; if (filter != null) { children = file.listFiles(filter); } else { children = file.listFiles(); ... |
SortedSet | recursiveListPartialPaths(File parent, boolean includeDirs) Recursively lists a directory, returning the partial paths of the child files. assert parent != null; TreeSet<String> toReturn = new TreeSet<String>(); int start = parent.getAbsolutePath().length() + 1; List<File> q = new LinkedList<File>(); q.add(parent); while (!q.isEmpty()) { File f = q.remove(0); if (f.isDirectory()) { ... |