public class PathVisitorFileFilter extends AbstractFileFilter
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(File file)
Checks to see if the File should be accepted by this filter.
|
boolean |
accept(File dir,
String name)
Checks to see if the File should be accepted by this filter.
|
FileVisitResult |
accept(Path path,
BasicFileAttributes attributes)
Checks to see if the Path should be accepted by this filter.
|
FileVisitResult |
visitFile(Path path,
BasicFileAttributes attributes) |
handle, postVisitDirectory, preVisitDirectory, toString, visitFileFailed
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
and, negate, or
public PathVisitorFileFilter(PathVisitor pathVisitor)
pathVisitor
- visit me.public boolean accept(File file)
AbstractFileFilter
accept
in interface FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the File to checkpublic boolean accept(File dir, String name)
AbstractFileFilter
accept
in interface FilenameFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
dir
- the directory File to checkname
- the file name within the directory to checkpublic FileVisitResult accept(Path path, BasicFileAttributes attributes)
IOFileFilter
path
- the Path to check.attributes
- the file's basic attributes (TODO may be null).public FileVisitResult visitFile(Path path, BasicFileAttributes attributes) throws IOException
visitFile
in interface FileVisitor<Path>
visitFile
in class AbstractFileFilter
IOException
Copyright © 2002–2021 The Apache Software Foundation. All rights reserved.