|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.common.io.PatternFilenameFilter
@Beta public final class PatternFilenameFilter
File name filter that only accepts files matching a regular expression.
Constructor Summary | |
---|---|
PatternFilenameFilter(Pattern pattern)
Constructs a pattern file name filter object. |
|
PatternFilenameFilter(String patternStr)
Constructs a pattern file name filter object. |
Method Summary | |
---|---|
boolean |
accept(File dir,
String fileName)
Tests if a specified file should be included in a file list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PatternFilenameFilter(String patternStr)
patternStr
- the pattern string on which to filter file names
PatternSyntaxException
- if pattern compilation fails (runtime)public PatternFilenameFilter(Pattern pattern)
pattern
- the pattern on which to filter file namesMethod Detail |
---|
public boolean accept(File dir, String fileName)
java.io.FilenameFilter
accept
in interface FilenameFilter
dir
- the directory in which the file was found.fileName
- the name of the file.
true
if and only if the name should be
included in the file list; false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |