Methods Summary |
---|
public static org.apache.commons.io.filefilter.IOFileFilter | ageFileFilter(long cutoff)Returns a filter that returns true if the file was last modified after
the specified cutoff time.
return new AgeFileFilter(cutoff);
|
public static org.apache.commons.io.filefilter.IOFileFilter | ageFileFilter(long cutoff, boolean acceptOlder)Returns a filter that filters files based on a cutoff time.
return new AgeFileFilter(cutoff, acceptOlder);
|
public static org.apache.commons.io.filefilter.IOFileFilter | ageFileFilter(java.util.Date cutoffDate)Returns a filter that returns true if the file was last modified after
the specified cutoff date.
return new AgeFileFilter(cutoffDate);
|
public static org.apache.commons.io.filefilter.IOFileFilter | ageFileFilter(java.util.Date cutoffDate, boolean acceptOlder)Returns a filter that filters files based on a cutoff date.
return new AgeFileFilter(cutoffDate, acceptOlder);
|
public static org.apache.commons.io.filefilter.IOFileFilter | ageFileFilter(java.io.File cutoffReference)Returns a filter that returns true if the file was last modified after
the specified reference file.
return new AgeFileFilter(cutoffReference);
|
public static org.apache.commons.io.filefilter.IOFileFilter | ageFileFilter(java.io.File cutoffReference, boolean acceptOlder)Returns a filter that filters files based on a cutoff reference file.
return new AgeFileFilter(cutoffReference, acceptOlder);
|
public static org.apache.commons.io.filefilter.IOFileFilter | andFileFilter(org.apache.commons.io.filefilter.IOFileFilter filter1, org.apache.commons.io.filefilter.IOFileFilter filter2)Returns a filter that ANDs the two specified filters.
return new AndFileFilter(filter1, filter2);
|
public static org.apache.commons.io.filefilter.IOFileFilter | asFileFilter(java.io.FileFilter filter)Returns an IOFileFilter that wraps the
FileFilter instance.
return new DelegateFileFilter(filter);
|
public static org.apache.commons.io.filefilter.IOFileFilter | asFileFilter(java.io.FilenameFilter filter)Returns an IOFileFilter that wraps the
FilenameFilter instance.
return new DelegateFileFilter(filter);
|
public static org.apache.commons.io.filefilter.IOFileFilter | directoryFileFilter()Returns a filter that checks if the file is a directory.
return DirectoryFileFilter.DIRECTORY;
|
public static org.apache.commons.io.filefilter.IOFileFilter | falseFileFilter()Returns a filter that always returns false.
return FalseFileFilter.FALSE;
|
public static org.apache.commons.io.filefilter.IOFileFilter | fileFileFilter()Returns a filter that checks if the file is a file (and not a directory).
return FileFileFilter.FILE;
|
public static org.apache.commons.io.filefilter.IOFileFilter | makeCVSAware(org.apache.commons.io.filefilter.IOFileFilter filter)Decorates a filter to make it ignore CVS directories.
Passing in null will return a filter that accepts everything
except CVS directories.
if (cvsFilter == null) {
cvsFilter = notFileFilter(
andFileFilter(directoryFileFilter(), nameFileFilter("CVS")));
}
if (filter == null) {
return cvsFilter;
} else {
return andFileFilter(filter, cvsFilter);
}
|
public static org.apache.commons.io.filefilter.IOFileFilter | makeDirectoryOnly(org.apache.commons.io.filefilter.IOFileFilter filter)Decorates a filter so that it only applies to directories and not to files.
if (filter == null) {
return DirectoryFileFilter.DIRECTORY;
}
return new AndFileFilter(DirectoryFileFilter.DIRECTORY, filter);
|
public static org.apache.commons.io.filefilter.IOFileFilter | makeFileOnly(org.apache.commons.io.filefilter.IOFileFilter filter)Decorates a filter so that it only applies to files and not to directories.
if (filter == null) {
return FileFileFilter.FILE;
}
return new AndFileFilter(FileFileFilter.FILE, filter);
|
public static org.apache.commons.io.filefilter.IOFileFilter | makeSVNAware(org.apache.commons.io.filefilter.IOFileFilter filter)Decorates a filter to make it ignore SVN directories.
Passing in null will return a filter that accepts everything
except SVN directories.
if (svnFilter == null) {
svnFilter = notFileFilter(
andFileFilter(directoryFileFilter(), nameFileFilter(".svn")));
}
if (filter == null) {
return svnFilter;
} else {
return andFileFilter(filter, svnFilter);
}
|
public static org.apache.commons.io.filefilter.IOFileFilter | nameFileFilter(java.lang.String name)Returns a filter that returns true if the filename matches the specified text.
return new NameFileFilter(name);
|
public static org.apache.commons.io.filefilter.IOFileFilter | notFileFilter(org.apache.commons.io.filefilter.IOFileFilter filter)Returns a filter that NOTs the specified filter.
return new NotFileFilter(filter);
|
public static org.apache.commons.io.filefilter.IOFileFilter | orFileFilter(org.apache.commons.io.filefilter.IOFileFilter filter1, org.apache.commons.io.filefilter.IOFileFilter filter2)Returns a filter that ORs the two specified filters.
return new OrFileFilter(filter1, filter2);
|
public static org.apache.commons.io.filefilter.IOFileFilter | prefixFileFilter(java.lang.String prefix)Returns a filter that returns true if the filename starts with the specified text.
return new PrefixFileFilter(prefix);
|
public static org.apache.commons.io.filefilter.IOFileFilter | sizeFileFilter(long threshold)Returns a filter that returns true if the file is bigger than a certain size.
return new SizeFileFilter(threshold);
|
public static org.apache.commons.io.filefilter.IOFileFilter | sizeFileFilter(long threshold, boolean acceptLarger)Returns a filter that filters based on file size.
return new SizeFileFilter(threshold, acceptLarger);
|
public static org.apache.commons.io.filefilter.IOFileFilter | sizeRangeFileFilter(long minSizeInclusive, long maxSizeInclusive)Returns a filter that accepts files whose size is >= minimum size
and <= maximum size.
IOFileFilter minimumFilter = new SizeFileFilter(minSizeInclusive, true);
IOFileFilter maximumFilter = new SizeFileFilter(maxSizeInclusive + 1L, false);
return new AndFileFilter(minimumFilter, maximumFilter);
|
public static org.apache.commons.io.filefilter.IOFileFilter | suffixFileFilter(java.lang.String suffix)Returns a filter that returns true if the filename ends with the specified text.
return new SuffixFileFilter(suffix);
|
public static org.apache.commons.io.filefilter.IOFileFilter | trueFileFilter()Returns a filter that always returns true.
return TrueFileFilter.TRUE;
|