2.17.2: 2011-06-17

net.sf.basedb.util
Class OlderThanFileFilter

java.lang.Object
  extended by net.sf.basedb.util.OlderThanFileFilter
All Implemented Interfaces:
FileFilter

public class OlderThanFileFilter
extends Object
implements FileFilter

An implementation of the FileFilter interface that filter files based on their age.

Version:
2.11
Author:
nicklas
Last modified
$Date: 2009-03-23 13:09:35 +0100 (Mon, 23 Mar 2009) $

Field Summary
private  long maxAge
           
private  boolean recursive
           
 
Constructor Summary
OlderThanFileFilter(long maxAge, boolean recursive)
          Create a new file filter that matches files that are older than the specified age.
 
Method Summary
 boolean accept(File file)
          Accept files that are older than the specified last modified time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxAge

private final long maxAge

recursive

private final boolean recursive
Constructor Detail

OlderThanFileFilter

public OlderThanFileFilter(long maxAge,
                           boolean recursive)
Create a new file filter that matches files that are older than the specified age.

Parameters:
maxAge - The age limit (in milliseconds). Files that are older are matched by this filter
recursive - If we should recurse into subdirectories or not
Method Detail

accept

public boolean accept(File file)
Accept files that are older than the specified last modified time.

Specified by:
accept in interface FileFilter

2.17.2: 2011-06-17