public class OlderThanFileFilter
extends java.lang.Object
implements java.io.FileFilter
FileFilter
interface
that filter files based on their age.Modifier and Type | Field and Description |
---|---|
private long |
maxAge |
private boolean |
recursive |
Constructor and Description |
---|
OlderThanFileFilter(long maxAge,
boolean recursive)
Create a new file filter that matches files that are older than
the specified age.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.io.File file)
Accept files that are older than the specified last
modified time.
|
public OlderThanFileFilter(long maxAge, boolean recursive)
maxAge
- The age limit (in milliseconds). Files that are
older are matched by this filterrecursive
- If we should recurse into subdirectories
or not