public interface IOFileFilter extends FileFilter, FilenameFilter, PathFilter, PathMatcher
FileFilter, FilenameFilter, PathFilter, and PathMatcher interfaces together.| Modifier and Type | Field and Description |
|---|---|
static String[] |
EMPTY_STRING_ARRAY
An empty String array.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(File file)
Tests if a File should be accepted by this filter.
|
boolean |
accept(File dir,
String name)
Tests if a File should be accepted by this filter.
|
default FileVisitResult |
accept(Path path,
BasicFileAttributes attributes)
Checks to see if a Path should be accepted by this filter.
|
default IOFileFilter |
and(IOFileFilter fileFilter)
Constructs a new "and" filter with this filter.
|
default boolean |
matches(Path path)
Tests if a Path should be accepted by this filter.
|
default IOFileFilter |
negate()
Constructs a new "not" filter with this filter.
|
default IOFileFilter |
or(IOFileFilter fileFilter)
Constructs a new "or" filter with this filter.
|
static final String[] EMPTY_STRING_ARRAY
boolean accept(File file)
Defined in FileFilter.
accept in interface FileFilterfile - the File to check.boolean accept(File dir, String name)
Defined in FilenameFilter.
accept in interface FilenameFilterdir - the directory File to check.name - the file name within the directory to check.default FileVisitResult accept(Path path, BasicFileAttributes attributes)
accept in interface PathFilterpath - the Path to check.attributes - the path's basic attributes (may be null).default IOFileFilter and(IOFileFilter fileFilter)
fileFilter - the filter to "and".default boolean matches(Path path)
matches in interface PathMatcherpath - the Path to check.default IOFileFilter negate()
default IOFileFilter or(IOFileFilter fileFilter)
fileFilter - the filter to "or".