commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <>
Subject [jira] Commented: (IO-119) Convenience "Builder" for creating complex FileFilter conditions
Date Thu, 14 Feb 2008 14:23:14 GMT


Jukka Zitting commented on IO-119:

Niall, good point about auto-complete. I agree that it makes this approach quite nice to write

I agree with Gary about cascading invocation, thus my comments above. But I'm OK with the
proposed addition given the superior auto-complete behaviour and people who'd use that in

> Convenience "Builder" for creating complex FileFilter conditions
> ----------------------------------------------------------------
>                 Key: IO-119
>                 URL:
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Filters
>    Affects Versions: 1.3.1
>            Reporter: Niall Pemberton
>            Assignee: Niall Pemberton
>            Priority: Minor
>             Fix For: 2.x
>         Attachments:,
> 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();

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message