Package edu.caltech.nanodb.util
Class RegexFileFilter
- java.lang.Object
-
- edu.caltech.nanodb.util.RegexFileFilter
-
- All Implemented Interfaces:
java.io.FileFilter
public class RegexFileFilter extends java.lang.Object implements java.io.FileFilter
This class provides a simple regex-based file filter for use withFile.listFiles(java.io.FileFilter)
. The regex pattern is provided to the constructor and is used to check files when retrieving directory listings. Note that only the file's name is tested; the path is not considered in the check.- See Also:
File.listFiles(java.io.FileFilter)
,Pattern
-
-
Constructor Summary
Constructors Constructor Description RegexFileFilter(java.lang.String regex)
Initialize a new regex file filter with the specified regex pattern.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(java.io.File file)
-