public class PathVisitorFileFilter extends AbstractFileFilter
Modifier and Type | Field and Description |
---|---|
private PathVisitor |
pathVisitor |
EMPTY_STRING_ARRAY
Constructor and Description |
---|
PathVisitorFileFilter(PathVisitor pathVisitor)
Constructs a new instance that will forward calls to the given visitor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.io.File file)
Checks to see if the File should be accepted by this filter.
|
boolean |
accept(java.io.File dir,
java.lang.String name)
Checks to see if the File should be accepted by this filter.
|
java.nio.file.FileVisitResult |
accept(java.nio.file.Path path,
java.nio.file.attribute.BasicFileAttributes attributes)
Checks to see if a Path should be accepted by this filter.
|
java.nio.file.FileVisitResult |
visitFile(java.nio.file.Path path,
java.nio.file.attribute.BasicFileAttributes attributes) |
append, append, get, handle, postVisitDirectory, preVisitDirectory, toDefaultFileVisitResult, toFileVisitResult, toString, visitFileFailed
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
and, matches, negate, or
private final PathVisitor pathVisitor
public PathVisitorFileFilter(PathVisitor pathVisitor)
pathVisitor
- visit me.public boolean accept(java.io.File file)
AbstractFileFilter
accept
in interface java.io.FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the File to checkpublic boolean accept(java.io.File dir, java.lang.String name)
AbstractFileFilter
accept
in interface java.io.FilenameFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
dir
- the directory File to checkname
- the file name within the directory to checkpublic java.nio.file.FileVisitResult accept(java.nio.file.Path path, java.nio.file.attribute.BasicFileAttributes attributes)
IOFileFilter
path
- the Path to check.attributes
- the file's basic attributes (TODO may be null).public java.nio.file.FileVisitResult visitFile(java.nio.file.Path path, java.nio.file.attribute.BasicFileAttributes attributes) throws java.io.IOException
visitFile
in interface java.nio.file.FileVisitor<java.nio.file.Path>
visitFile
in class AbstractFileFilter
java.io.IOException