public class OlderThanFileFilter extends Object implements 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.
|
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 notpublic boolean accept(File file)
accept
in interface FileFilter