Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
1.3.1
-
None
-
None
Description
I'd like to add a new convenience "builder" class (FileFilterBuilder) to make it easier to create complex FileFilter using Commons IO's IOFileFilter implementations.
Heres an example of how it can be used to create a IOFileFilter for the following conditions:
- Either, directories which are not hidden and not named ".svn"
- or, files which have a suffix of ".java"
IOFileFilter filter = FileFilterBuilder.orBuilder()
.and().isDirectory().isHidden(false).not().name(".svn").end()
.and().isFile().suffix(".java").end()
.getFileFilter();