FilenameFilterpublic class FilenameMaskFilter extends Object implements FilenameFilter
java.io.File listing.
The mask is given as a well-known DOS filename format, with '*' and '?' as
wildcards.
All other characters counts as ordinary characters.
The file name masks are used as a filter input and is given to the class via
the string array property:filenameMasksForInclusion - Filename mask for exclusion of
files (default if both properties are defined)
filenameMasksForExclusion - Filename mask for exclusion of
files.
A recommended way of doing this is by referencing to the component which uses
this class for file listing. In this way all properties are set in the same
component and this utility component is kept in the background with only
initial configuration necessary.java.io.File.list,
java.io.FilenameFilter,
WildcardStringParser| Constructor | Description |
|---|---|
FilenameMaskFilter() |
Deprecated.
Creates a
FilenameMaskFilter |
FilenameMaskFilter(String pFilenameMask) |
Deprecated.
Creates a
FilenameMaskFilter |
FilenameMaskFilter(String[] pFilenameMasks) |
Deprecated.
Creates a
FilenameMaskFilter |
FilenameMaskFilter(String[] pFilenameMasks,
boolean pExclusion) |
Deprecated.
Creates a
FilenameMaskFilter |
FilenameMaskFilter(String pFilenameMask,
boolean pExclusion) |
Deprecated.
Creates a
FilenameMaskFilter |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
accept(File pDir,
String pName) |
Deprecated.
This method implements the
java.io.FilenameFilter interface. |
String[] |
getFilenameMasksForExclusion() |
Deprecated.
|
String[] |
getFilenameMasksForInclusion() |
Deprecated.
|
void |
setFilenameMasksForExclusion(String[] pFilenameMasksForExclusion) |
Deprecated.
|
void |
setFilenameMasksForInclusion(String[] pFilenameMasksForInclusion) |
Deprecated.
|
String |
toString() |
Deprecated.
|
public FilenameMaskFilter()
FilenameMaskFilterpublic FilenameMaskFilter(String pFilenameMask)
FilenameMaskFilterpFilenameMask - the filename maskpublic FilenameMaskFilter(String[] pFilenameMasks)
FilenameMaskFilterpFilenameMasks - the filename maskspublic FilenameMaskFilter(String pFilenameMask, boolean pExclusion)
FilenameMaskFilterpFilenameMask - the filename maskspExclusion - if true, the masks will be excludedpublic FilenameMaskFilter(String[] pFilenameMasks, boolean pExclusion)
FilenameMaskFilterpFilenameMasks - the filename maskspExclusion - if true, the masks will be excludedpublic void setFilenameMasksForInclusion(String[] pFilenameMasksForInclusion)
pFilenameMasksForInclusion - the filename masks to includepublic String[] getFilenameMasksForInclusion()
public void setFilenameMasksForExclusion(String[] pFilenameMasksForExclusion)
pFilenameMasksForExclusion - the filename masks to excludepublic String[] getFilenameMasksForExclusion()
public boolean accept(File pDir, String pName)
java.io.FilenameFilter interface.accept in interface FilenameFilterpDir - the directory in which the file was found.pName - the name of the file.true if the file pName should be included in the file
list; false otherwise.Copyright © 2018. All rights reserved.