org.apache.commons.io.filefilter

Class AgeFileFilter

    • Constructor Summary

      Constructors 
      Constructor and Description
      AgeFileFilter(Date cutoffDate)
      Constructs a new age file filter for files older than (at or before) a certain cutoff date.
      AgeFileFilter(Date cutoffDate, boolean acceptOlder)
      Constructs a new age file filter for files on any one side of a certain cutoff date.
      AgeFileFilter(File cutoffReference)
      Constructs a new age file filter for files older than (at or before) a certain File (whose last modification time will be used as reference).
      AgeFileFilter(File cutoffReference, boolean acceptOlder)
      Constructs a new age file filter for files on any one side of a certain File (whose last modification time will be used as reference).
      AgeFileFilter(long cutoff)
      Constructs a new age file filter for files equal to or older than a certain cutoff
      AgeFileFilter(long cutoff, boolean acceptOlder)
      Constructs a new age file filter for files on any one side of a certain cutoff.
    • Constructor Detail

      • AgeFileFilter

        public AgeFileFilter(long cutoff)
        Constructs a new age file filter for files equal to or older than a certain cutoff
        Parameters:
        cutoff - the threshold age of the files
      • AgeFileFilter

        public AgeFileFilter(long cutoff,             boolean acceptOlder)
        Constructs a new age file filter for files on any one side of a certain cutoff.
        Parameters:
        cutoff - the threshold age of the files
        acceptOlder - if true, older files (at or before the cutoff) are accepted, else newer ones (after the cutoff).
      • AgeFileFilter

        public AgeFileFilter(Date cutoffDate)
        Constructs a new age file filter for files older than (at or before) a certain cutoff date.
        Parameters:
        cutoffDate - the threshold age of the files
      • AgeFileFilter

        public AgeFileFilter(Date cutoffDate,             boolean acceptOlder)
        Constructs a new age file filter for files on any one side of a certain cutoff date.
        Parameters:
        cutoffDate - the threshold age of the files
        acceptOlder - if true, older files (at or before the cutoff) are accepted, else newer ones (after the cutoff).
      • AgeFileFilter

        public AgeFileFilter(File cutoffReference)
        Constructs a new age file filter for files older than (at or before) a certain File (whose last modification time will be used as reference).
        Parameters:
        cutoffReference - the file whose last modification time is usesd as the threshold age of the files
      • AgeFileFilter

        public AgeFileFilter(File cutoffReference,             boolean acceptOlder)
        Constructs a new age file filter for files on any one side of a certain File (whose last modification time will be used as reference).
        Parameters:
        cutoffReference - the file whose last modification time is usesd as the threshold age of the files
        acceptOlder - if true, older files (at or before the cutoff) are accepted, else newer ones (after the cutoff).
    • Method Detail

      • accept

        public boolean accept(File file)
        Checks to see if the last modification of the file matches cutoff favorably.

        If last modification time equals cutoff and newer files are required, file IS NOT selected. If last modification time equals cutoff and older files are required, file IS selected.

        Specified by:
        accept in interface FileFilter
        Specified by:
        accept in interface IOFileFilter
        Overrides:
        accept in class AbstractFileFilter
        Parameters:
        file - the File to check
        Returns:
        true if the filename matches
      • toString

        public String toString()
        Provide a String representaion of this file filter.
        Overrides:
        toString in class AbstractFileFilter
        Returns:
        a String representaion

Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.



NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14