public class FileEqualsFileFilter extends AbstractFileFilter
File
object match. You can use this filter to visit the start directory when walking a
file tree with
Files.walkFileTree(java.nio.file.Path, java.util.Set, int, java.nio.file.FileVisitor)
.EMPTY_STRING_ARRAY
Constructor and Description |
---|
FileEqualsFileFilter(File file)
Constructs a new instance for the given
File . |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(File file)
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.
|
accept, handle, postVisitDirectory, preVisitDirectory, toString, visitFile, visitFileFailed
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
and, negate, or
public FileEqualsFileFilter(File file)
File
.file
- The file to match.public boolean accept(File file)
AbstractFileFilter
accept
in interface FileFilter
accept
in interface IOFileFilter
accept
in class AbstractFileFilter
file
- the File to checkpublic FileVisitResult accept(Path path, BasicFileAttributes attributes)
IOFileFilter
path
- the Path to check.attributes
- the file's basic attributes (TODO may be null).Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.