public class FilenamePrefixFilter extends Object implements FilenameFilter
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
ignoreCase
Flag to signal that we want to ignore the case.
|
protected String |
prefix
The prefix which files must have to be accepted.
|
| Constructor and Description |
|---|
FilenamePrefixFilter(String prefix)
Construct a case sensitive FilenamePrefixFilter.
|
FilenamePrefixFilter(String prefix,
boolean ignoreCase)
Construct a FilenamePrefixFilter.
|
protected final String prefix
protected final boolean ignoreCase
public FilenamePrefixFilter(String prefix, boolean ignoreCase)
prefix - The prefix which files must have to be accepted.ignoreCase - True if the filter should be case-insensitive.public FilenamePrefixFilter(String prefix)
prefix - The prefix which files must have to be accepted.public boolean accept(File dir, String name)
accept in interface FilenameFilterdir - The directory the file resides in.name - The name of the file.Copyright © 2015 JBoss by Red Hat. All rights reserved.