Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 91772 invoked from network); 14 Feb 2008 14:23:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Feb 2008 14:23:41 -0000 Received: (qmail 89168 invoked by uid 500); 14 Feb 2008 14:23:31 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 89066 invoked by uid 500); 14 Feb 2008 14:23:31 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 89030 invoked by uid 99); 14 Feb 2008 14:23:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Feb 2008 06:23:31 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Feb 2008 14:22:53 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 1B88071407B for ; Thu, 14 Feb 2008 06:23:14 -0800 (PST) Message-ID: <14606575.1202998994108.JavaMail.jira@brutus> Date: Thu, 14 Feb 2008 06:23:14 -0800 (PST) From: "Jukka Zitting (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (IO-119) Convenience "Builder" for creating complex FileFilter conditions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/IO-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568943#action_12568943 ] Jukka Zitting commented on IO-119: ---------------------------------- Niall, good point about auto-complete. I agree that it makes this approach quite nice to write against. 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 practice. > Convenience "Builder" for creating complex FileFilter conditions > ---------------------------------------------------------------- > > Key: IO-119 > URL: https://issues.apache.org/jira/browse/IO-119 > 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: FileFilterBuilder.java, FileFilterBuilderTestCase.java > > > 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.