This filter selects files and directories based on one or more wildcards. Testing is case-sensitive by default, but this can be configured.
The wildcard matcher uses the characters '?' and '*' to represent a single or multiple wildcard characters. This is the same as often found on Dos/Unix command lines. The check is case-sensitive by default. See {@link FilenameUtils#wildcardMatchOnSystem} for more information.
For example:
File dir = new File("."); FileFilter fileFilter = new WildcardFileFilter("*test*.java~*~"); File[] files = dir.listFiles(fileFilter); for (int i = 0; i < files.length; i++) { System.out.println(files[i]); }@version $Id: WildcardFileFilter.java 1563227 2014-01-31 19:45:30Z ggregory $ @since 1.3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|