public static File[] filesOverModDate(File[] files,Interval retention){
  ArrayList<File> overFiles=new ArrayList<File>();
  long now=System.currentTimeMillis();
  for (  File file : files) {
    long modDate=file.lastModified();
    if (modDate > 0 && retention.overInterval(modDate,now))     overFiles.add(file);
  }
  File[] fileArray=new File[overFiles.size()];
  return overFiles.toArray(fileArray);
}

public static File [ ] filesOverModDate ( File [ ] files , Interval retention ) { ArrayList < File > overFiles = new ArrayList < File > ( ) ; long now = System . currentTimeMillis ( ) ; for ( File file : files ) { long modDate = file . lastModified ( ) ; if ( modDate > 0 && retention . overInterval ( modDate , now ) ) overFiles . add ( file ) ; } File [ ] fileArray = new File [ overFiles . size ( ) ] ; return overFiles . toArray ( fileArray ) ; }
returns members of a file array whose last modification dates are older than a specific retention period .
