| java.lang.Object org.apache.oro.io.RegexFilenameFilter
All known Subclasses: org.apache.oro.io.Perl5FilenameFilter, org.apache.oro.io.AwkFilenameFilter, org.apache.oro.io.GlobFilenameFilter,
Method Summary | |
public boolean | accept(File dir, String filename) Filters a filename. | public boolean | accept(File pathname) Filters a filename. | public void | setFilterExpression(String regex) Set the regular expression on which to filter.
Parameters: regex - The regular expression on which to filter. exception: MalformedCachePatternException - If there is an error incompiling the regular expression. | public void | setFilterExpression(String regex, int options) Set the regular expression on which to filter along with any
special options to use when compiling the expression.
Parameters: regex - The regular expression on which to filter. Parameters: options - A set of compilation options specific to the regularexpression grammar being used. exception: MalformedCachePatternException - If there is an error incompiling the regular expression. |
accept | public boolean accept(File dir, String filename)(Code) | | Filters a filename. Tests if the filename EXACTLY matches the pattern
contained by the filter. The directory argument is not examined.
Conforms to the java.io.FilenameFilter interface.
Parameters: dir - The directory containing the file. Parameters: filename - The name of the file. True if the filename EXACTLY matches the pattern, false if not. |
accept | public boolean accept(File pathname)(Code) | | Filters a filename. Tests if the filename EXACTLY matches the pattern
contained by the filter. The filename is defined as pathname.getName().
Conforms to the java.io.FileFilter interface.
Parameters: pathname - The file pathname. True if the filename EXACTLY matches the pattern, false if not. |
setFilterExpression | public void setFilterExpression(String regex) throws MalformedCachePatternException(Code) | | Set the regular expression on which to filter.
Parameters: regex - The regular expression on which to filter. exception: MalformedCachePatternException - If there is an error incompiling the regular expression. This need not be caught ifyou are using a hard-coded expression that you know is correct.But for robustness and reliability you should catch this exceptionfor dynamically entered expressions determined at runtime. |
setFilterExpression | public void setFilterExpression(String regex, int options) throws MalformedCachePatternException(Code) | | Set the regular expression on which to filter along with any
special options to use when compiling the expression.
Parameters: regex - The regular expression on which to filter. Parameters: options - A set of compilation options specific to the regularexpression grammar being used. exception: MalformedCachePatternException - If there is an error incompiling the regular expression. This need not be caught ifyou are using a hard-coded expression that you know is correct.But for robustness and reliability you should catch this exceptionfor dynamically entered expressions determined at runtime. |
|
|