Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 84516 invoked from network); 29 Oct 2009 14:16:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Oct 2009 14:16:35 -0000 Received: (qmail 6621 invoked by uid 500); 29 Oct 2009 14:16:34 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 6521 invoked by uid 500); 29 Oct 2009 14:16:34 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 6510 invoked by uid 99); 29 Oct 2009 14:16:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Oct 2009 14:16:34 +0000 X-ASF-Spam-Status: No, hits=-1.8 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dlwester@us.ibm.com designates 32.97.110.153 as permitted sender) Received: from [32.97.110.153] (HELO e35.co.us.ibm.com) (32.97.110.153) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Oct 2009 14:16:23 +0000 Received: from d03relay05.boulder.ibm.com (d03relay05.boulder.ibm.com [9.17.195.107]) by e35.co.us.ibm.com (8.14.3/8.13.1) with ESMTP id n9TE4k2E001416 for ; Thu, 29 Oct 2009 08:04:46 -0600 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay05.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n9TEFlOg126876 for ; Thu, 29 Oct 2009 08:15:49 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id n9T8EShZ006559 for ; Thu, 29 Oct 2009 02:14:28 -0600 Received: from d03nm119.boulder.ibm.com (d03nm119.boulder.ibm.com [9.17.195.145]) by d03av04.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id n9T8ESuh006549 for ; Thu, 29 Oct 2009 02:14:28 -0600 In-Reply-To: <1256824631.73129.ezmlm@commons.apache.org> References: <1256824631.73129.ezmlm@commons.apache.org> To: user@commons.apache.org MIME-Version: 1.0 Subject: commons-io : FileFilters X-KeepSent: 8635F48A:DFA65094-8525765E:004DEC38; type=4; name=$KeepSent X-Mailer: Lotus Notes Release 8.0.2 HF623 January 16, 2009 From: Dave Westerman Message-ID: Date: Thu, 29 Oct 2009 10:15:45 -0400 X-MIMETrack: Serialize by Router on D03NM119/03/M/IBM(Release 8.5.1|September 28, 2009) at 10/29/2009 08:15:46, Serialize complete at 10/29/2009 08:15:46 Content-Type: multipart/alternative; boundary="=_alternative 004E57318525765E_=" X-Virus-Checked: Checked by ClamAV on apache.org --=_alternative 004E57318525765E_= Content-Type: text/plain; charset="US-ASCII" I'm trying to use Apache Commons IO FileFilters, and it's obvious I don't clearly understand them, because I can't get them to work trying to find a subdirectory. Here's my code: File configCellDir = new File( FilenameUtils.concat( wasProfile , "config/cells" ) ) ; IOFileFilter dmgrFilter = FileFilterUtils.nameFileFilter( "dmgr" ) ; Collection dmgrDirs = FileUtils.listFiles( configCellDir , dmgrFilter , TrueFileFilter.INSTANCE ) ; I'm trying to find a subdirectory 'dmgr' anywhere in the /config/cells filesystem. The directory is definitely there, but the dmgrDirs collection is empty. I've also tried: WildcardFileFilter dmgrFilter = new WildcardFileFilter( "*dmgr*" ) ; and: RegexFileFilter dmgrFilter = new RegexFileFilter( ".*dmgr.*" ) ; All without success. However, if I try to find a file, it works. IOFileFilter serverIndexFilter = FileFilterUtils.nameFileFilter( "serverindex.xml" ) ; Collection serverIndexFiles = FileUtils.listFiles( configCellDir , serverIndexFilter , TrueFileFilter.INSTANCE ) ; Can anyone tell me what I'm doing wrong? Thanks! DLW --=_alternative 004E57318525765E_=--