public class WildcardFilter extends Object implements FileFilter
| Constructor and Description |
|---|
WildcardFilter(String expression,
boolean acceptDir,
boolean acceptFile)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(File file)
Returns whether a file matches the criteria of this filter.
|
public WildcardFilter(String expression, boolean acceptDir, boolean acceptFile)
expression - The wildcard expression against which
the file names are checked.acceptDir - Whether directories are accepted at all.acceptFile - Whether files are accepted at all.public boolean accept(File file)
acceptDir is false,
the file is rejected.
If the file is regular file and acceptFile is false,
the file is rejected.
If the filename does not match the wildcard filter, the file is
rejected.
If none of the above applies, the file is accepted.accept in interface FileFilterCopyright © 2000–2020 The Apache Software Foundation. All rights reserved.