Package org.apache.commons.io.filefilter
Class PathEqualsFileFilter
java.lang.Object
org.apache.commons.io.filefilter.AbstractFileFilter
org.apache.commons.io.filefilter.PathEqualsFileFilter
- All Implemented Interfaces:
- FileFilter,- FilenameFilter,- FileVisitor<Path>,- PathMatcher,- PathFilter,- PathVisitor,- IOFileFilter
Accepts only an exact 
Path 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).- Since:
- 2.9.0
- 
Field SummaryFields inherited from interface org.apache.commons.io.filefilter.IOFileFilterEMPTY_STRING_ARRAY
- 
Constructor SummaryConstructorsConstructorDescriptionPathEqualsFileFilter(Path file) Constructs a new instance for the givenPath.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanTests to see if the File should be accepted by this filter.accept(Path path, BasicFileAttributes attributes) Checks to see if a Path should be accepted by this filter.Methods inherited from class org.apache.commons.io.filefilter.AbstractFileFilteraccept, handle, postVisitDirectory, preVisitDirectory, toString, visitFile, visitFileFailedMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.commons.io.filefilter.IOFileFilterand, matches, negate, or
- 
Constructor Details- 
PathEqualsFileFilterConstructs a new instance for the givenPath.- Parameters:
- file- The file to match.
 
 
- 
- 
Method Details- 
acceptDescription copied from class:AbstractFileFilterTests to see if the File should be accepted by this filter.- Specified by:
- acceptin interface- FileFilter
- Specified by:
- acceptin interface- IOFileFilter
- Overrides:
- acceptin class- AbstractFileFilter
- Parameters:
- file- the File to check
- Returns:
- true if this file matches the test
 
- 
acceptDescription copied from interface:IOFileFilterChecks to see if a Path should be accepted by this filter.- Parameters:
- path- the Path to check.
- attributes- the path's basic attributes (may be null).
- Returns:
- true if this path matches the test.
 
 
-