Example usage for java.io FileFilter toString

List of usage examples for java.io FileFilter toString

Introduction

In this page you can find the example usage for java.io FileFilter toString.

Prototype

public String toString() 

Source Link

Document

Returns a string representation of the object.

Usage

From source file:com.BibleQuote.utils.FsUtils.java

public static void SearchByFilter(File currentFile, ArrayList<String> resultFiles, FileFilter filter)
        throws IOException {

    try {//from   ww w.  ja va2s.  c o m
        File[] files = currentFile.listFiles(filter);
        if (files == null) {
            return;
        }
        for (File file : files) {
            if (!file.canRead()) {
                continue;
            } else if (file.isDirectory()) {
                SearchByFilter(file, resultFiles, filter);
            } else {
                resultFiles.add(file.getAbsolutePath());
            }
        }
    } catch (Exception e) {
        Log.e(TAG, String.format("SearchByFilter(%1$s, %2$s)", currentFile.getName(), filter.toString()), e);
    }

}