|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjodd.file.filters.RegExpFileFilter
FileFilter that matches files with use of regular expression. By default, both files and directories are matched, but only by their name (not including path). This behaviour can be changed by using the following flags:
File
understands unix-like file separators, no matter
what underlying system really is (at least it works so on windows).
Therefore, regexp patterns should written for unix-like file names.
Constructor Summary | |
RegExpFileFilter(java.lang.String regexp)
Regular Expression file filter with default behaviour. |
|
RegExpFileFilter(java.lang.String regexp,
java.lang.String opt)
Regular Expression file filter. |
Method Summary | |
boolean |
accept(java.io.File f)
Tests whether or not the specified File matches conditions. |
boolean |
getMatchPath()
|
boolean |
getSkipDirs()
|
void |
setMatchPath(boolean v)
Set match path flag. |
void |
setSkipDirs(boolean v)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RegExpFileFilter(java.lang.String regexp, java.lang.String opt)
regexp
- regexp patternopt
- subset of following flags:
public RegExpFileFilter(java.lang.String regexp)
regexp
- regexp patternMethod Detail |
public void setMatchPath(boolean v)
v
- public boolean getMatchPath()
public void setSkipDirs(boolean v)
public boolean getSkipDirs()
public boolean accept(java.io.File f)
accept
in interface java.io.FileFilter
f
- file to be tested
true
if file matches ok, otherwise false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |