Java Utililty Methods Folder Visit

List of utility methods to do Folder Visit

Description

The list of methods to do Folder Visit are organized into topic(s).

Method

ListdeepListFiles(File dir, FileFilter filter)
Return a list of files from the given directory and matching the given filter.
return deepListFiles(dir, filter, true);
ArrayListdeepListFiles(String sDir, String suffix)
deep List Files
final String _suffix = suffix;
File[] all, files;
File f, dir;
dir = new File(sDir);
all = dir.listFiles();
files = dir.listFiles(new FilenameFilter() {
    public boolean accept(File dir, String name) {
        File file = new File(dir, name);
...
voiddeepListFilesVisitor(File file, FileFilter filter, boolean checkDir, List list)
deep List Files Visitor
if (file.isDirectory()) {
    if (checkDir && filter != null && !filter.accept(file)) {
        return;
    File[] files = file.listFiles();
    for (int i = 0; i < files.length; i++) {
        deepListFilesVisitor(files[i], filter, checkDir, list);
} else {
    if (filter == null || filter.accept(file)) {
        list.add(file);