Java Recursive List recursiveListFilesHelper(File dir, FileFilter filter, List fileList)

Here you can find the source of recursiveListFilesHelper(File dir, FileFilter filter, List fileList)

Description

recursive List Files Helper

License

Apache License

Declaration

public static void recursiveListFilesHelper(File dir, FileFilter filter, List<File> fileList) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.*;

import java.util.List;

public class Main {
    public static void recursiveListFilesHelper(File dir, FileFilter filter, List<File> fileList) {
        for (File f : dir.listFiles()) {
            if (f.isDirectory()) {
                recursiveListFilesHelper(f, filter, fileList);
            } else {
                if (filter.accept(f))
                    fileList.add(f);/*from w ww  .  j a v  a2  s. c  om*/
            }
        }
    }
}

Related

  1. recursiveListFile(File folder)
  2. recursiveListFiles(File baseDir, final FileFilter filter)
  3. recursiveListFiles(File dir, FileFilter filter)
  4. recursiveListFiles(File file, List files)
  5. recursiveListFiles(String path)
  6. recursiveListint(List list, File file, FilenameFilter filter)
  7. recursiveListPartialPaths(File parent, boolean includeDirs)