public class WildcardOSFilter
extends org.apache.commons.io.filefilter.AbstractFileFilter
| Constructor and Description |
|---|
WildcardOSFilter(List<String> wc)
Constructor for a list of wildcards.
|
WildcardOSFilter(String wc)
Constructor for a single wildcard.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(File file)
Checks to see if the filename matches one of the wildcards.
|
boolean |
accept(File dir,
String name)
Checks to see if the filename matches one of the wildcards.
|
List<String> |
getWildcards()
Returns list of filters that were set.
|
public WildcardOSFilter(String wc)
wc - a single filter to setpublic List<String> getWildcards()
public boolean accept(File file)
accept in interface FileFilteraccept in interface org.apache.commons.io.filefilter.IOFileFilteraccept in class org.apache.commons.io.filefilter.AbstractFileFilterfile - the file to check.public boolean accept(File dir, String name)
accept in interface FilenameFilteraccept in interface org.apache.commons.io.filefilter.IOFileFilteraccept in class org.apache.commons.io.filefilter.AbstractFileFilterdir - the directory to check.name - the file name within the directory to check.Copyright © 2020. All rights reserved.