|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindprod.filter.WildcardFilter
public final class WildcardFilter
filter out all but files that match a given wildcard Pattern.
Note the name is WildcardFilter not WildCardFilter.
Constructor Summary | |
---|---|
WildcardFilter(java.lang.String wildcard)
constructor |
Method Summary | |
---|---|
boolean |
accept(java.io.File dir,
java.lang.String name)
Select only files that match the wildcard/regex Pattern. |
static void |
main(java.lang.String[] args)
Test Harness |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WildcardFilter(java.lang.String wildcard)
wildcard
- pattern of files you want e.g. some*.txt debug?.c*Method Detail |
---|
public boolean accept(java.io.File dir, java.lang.String name)
accept
in interface java.io.FilenameFilter
dir
- the directory in which the file was found.name
- the simple name of the file
public static void main(java.lang.String[] args)
args
- wildcar, best enclosed in quotes to prevent other levels tampering with it..
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |