|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindprod.filter.JunkFilter
public class JunkFilter
Filter to detect junk files.
accept only junk files. Can define junk files by name, extension, starts with or endsWith lists.
Constructor Summary | |
---|---|
JunkFilter()
Defines which filenames and extensions are considered junk, to be deleted. |
Method Summary | |
---|---|
boolean |
accept(java.io.File dir,
java.lang.String name)
Accept only junk files to be deleted. |
void |
setEndsWith(java.lang.String... junkEndsWith)
Set the list of junk ends-with criteria. |
void |
setExtensions(java.lang.String... junkExtensions)
Set the list of just extensions. |
void |
setFilenames(java.lang.String... junkFilenames)
Set the list of junk filenames. |
void |
setStartsWith(java.lang.String... junkStartsWith)
Set the list of junk start -with criteria. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JunkFilter()
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 name of the file.
public void setEndsWith(java.lang.String... junkEndsWith)
junkEndsWith
- Array of strings. If file starts this way, it considered junk.public void setExtensions(java.lang.String... junkExtensions)
junkExtensions
- Array of strings defining unqualified, dotless filename extensions considered junk.public void setFilenames(java.lang.String... junkFilenames)
junkFilenames
- Array of strings defining the unqualified, extensionless filenames considered junk.public void setStartsWith(java.lang.String... junkStartsWith)
junkStartsWith
- Array of strings. If file starts this way, it considered junk.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |