jut.io
Class DirectoryTree.DirFilter
java.lang.Object
jut.io.DirectoryTree.DirFilter
- All Implemented Interfaces:
- ParamCallable<List<File>,File>
- Enclosing class:
- DirectoryTree
public static class DirectoryTree.DirFilter
- extends Object
- implements ParamCallable<List<File>,File>
directory listing filter. this base filter class just returns all children of a directory.
Method Summary |
List<File> |
call(File dir)
returns the files contained in the argument directory passing the filter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectoryTree.DirFilter
public DirectoryTree.DirFilter()
call
public List<File> call(File dir)
- returns the files contained in the argument directory passing the filter.
this method uses Files.listFiles(File)
internally. subclasses should either call
their base class' call(File)
method to get the initial list of files to filter or
also use Files.listFiles(File)
. that way, directory listing can be adapted globally
as described in Files.listFiles(File)
e.g. for implementing a a file access speed
limit.
- Specified by:
call
in interface ParamCallable<List<File>,File>
- Parameters:
dir
- - the directory to scan for files passing the filter.
- Returns:
- the files contained in the argument directory passing the filter.