Package org.apache.commons.io.filefilter
Class PathMatcherFileFilter
- java.lang.Object
-
- org.apache.commons.io.filefilter.AbstractFileFilter
-
- org.apache.commons.io.filefilter.PathMatcherFileFilter
-
- All Implemented Interfaces:
java.io.FileFilter,java.io.FilenameFilter,java.nio.file.FileVisitor<java.nio.file.Path>,java.nio.file.PathMatcher,PathFilter,PathVisitor,IOFileFilter
public class PathMatcherFileFilter extends AbstractFileFilter
Delegates matching to aPathMatcher.- Since:
- 2.14.0
-
-
Field Summary
-
Fields inherited from interface org.apache.commons.io.filefilter.IOFileFilter
EMPTY_STRING_ARRAY
-
-
Constructor Summary
Constructors Constructor Description PathMatcherFileFilter(java.nio.file.PathMatcher pathMatcher)Constructs a new instance to perform matching with a PathMatcher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(java.io.File file)Checks to see if the File should be accepted by this filter.booleanmatches(java.nio.file.Path path)Tests if a Path should be accepted by this filter.-
Methods inherited from class org.apache.commons.io.filefilter.AbstractFileFilter
accept, postVisitDirectory, preVisitDirectory, toString, visitFile, visitFileFailed
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.commons.io.filefilter.IOFileFilter
accept, and, negate, or
-
-
-
-
Method Detail
-
accept
public boolean accept(java.io.File file)
Description copied from class:AbstractFileFilterChecks to see if the File should be accepted by this filter.- Specified by:
acceptin interfacejava.io.FileFilter- Specified by:
acceptin interfaceIOFileFilter- Overrides:
acceptin classAbstractFileFilter- Parameters:
file- the File to check- Returns:
- true if this file matches the test
-
matches
public boolean matches(java.nio.file.Path path)
Description copied from interface:IOFileFilterTests if a Path should be accepted by this filter.- Parameters:
path- the Path to check.- Returns:
- true if this path matches the test.
-
-