public class ExtendedFileFilter
extends java.lang.Object
implements java.io.FileFilter
| Constructor and Description |
|---|
ExtendedFileFilter()
Create a ne instance.
|
ExtendedFileFilter(java.io.FilenameFilter filter)
Create an instance and chain an additional filename filter.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(java.io.File file) |
void |
setCanRead(java.lang.Boolean canRead)
Sets the filter for the file attribute "canRead" concerning directories and files.
|
void |
setCanWrite(boolean canWrite)
Sets the filter for the file attribute "canWrite" concerning directories and files.
|
void |
setFilenameFilter(java.io.FilenameFilter filter)
Chain an additional filter to verify filenames to meet the defined nameing constraints.
|
void |
setIsDirectory(boolean isDirectory)
Sets the filter for files.
|
void |
setIsDirectoryOnly()
Sets the filter to pass only directories and no files.
|
void |
setIsFile(boolean isFile)
Sets the filter for directories.
|
void |
setIsFileOnly()
Sets the filter to pass only file and no directories.
|
void |
setIsHidden(boolean isHidden)
Sets the filter for the files attribute "isHidden" concerning directories and files.
|
void |
setMaxDate(java.util.Date date)
Sets the filter for the file attribute "lastModifiedDate" concerning directories and files.
|
void |
setMinDate(java.util.Date date)
Sets the filter for the file attribute "lastModifiedDate" concerning directories and files.
|
public ExtendedFileFilter()
public ExtendedFileFilter(java.io.FilenameFilter filter)
filter - - filename filter to find matching files.public final void setFilenameFilter(java.io.FilenameFilter filter)
filter - - filename filter to find matching files.public final void setMaxDate(java.util.Date date)
date - - Filters file which date is less or equal maxDate.public final void setMinDate(java.util.Date date)
date - - Filters file which date is greater or equal minDate.public final void setCanRead(java.lang.Boolean canRead)
canRead - - true enables the filter to pass readable ones,
false prevents the filter to pass readable ones.public final void setCanWrite(boolean canWrite)
canWrite - - true enables the filter to pass writable ones,
false prevents the filter to pass writeable ones.public final void setIsHidden(boolean isHidden)
isHidden - - true enables the filter to pass hidden ones,
false prevents the filter to pass hidden ones.public final void setIsFile(boolean isFile)
isFile - - true enables the filter to pass files,
false prevents the filter to pass files.public final void setIsDirectory(boolean isDirectory)
isDirectory - - true enables the filter to pass directories,
false prevents the filter to pass directories.public final void setIsDirectoryOnly()
public final void setIsFileOnly()
public final boolean accept(java.io.File file)
accept in interface java.io.FileFilterfile - - the file, which attributes are verified.