Package net.sf.basedb.util
Class RegexpFileFilter
java.lang.Object
net.sf.basedb.util.RegexpFileFilter
- All Implemented Interfaces:
FileFilter
An implementation of the
FileFilter
interface
that filter files and directories based on regular expressions.- Version:
- 2.5
- Author:
- nicklas
- Last modified
- $Date: 2012-09-14 09:28:35 +0200 (fr, 14 sep 2012) $
-
Field Summary
-
Constructor Summary
ConstructorDescriptionRegexpFileFilter
(String fileRegexp, String directoryRegexp) Create a new file filter from a string regular expressions.RegexpFileFilter
(Pattern filePattern, Pattern directoryPattern) Create a new file filter from patterns. -
Method Summary
-
Field Details
-
filePattern
-
directoryPattern
-
-
Constructor Details
-
RegexpFileFilter
Create a new file filter from a string regular expressions.- Parameters:
fileRegexp
- The regular expression used to match file names or null to match all filesdirectoryRegexp
- The regular expression used to match directory names or null to match all directories
-
RegexpFileFilter
Create a new file filter from patterns.- Parameters:
filePattern
- The pattern used to match file names, or null to match all filesdirectoryPattern
- The pattern used to match the directory names, or null to match all directories
-
-
Method Details
-
accept
Accept files with a name matching the regular expression- Specified by:
accept
in interfaceFileFilter
-