Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 16591 invoked from network); 21 Jul 2006 20:31:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jul 2006 20:31:02 -0000 Received: (qmail 59533 invoked by uid 500); 21 Jul 2006 20:31:00 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 59452 invoked by uid 500); 21 Jul 2006 20:31:00 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 59441 invoked by uid 99); 21 Jul 2006 20:31:00 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jul 2006 13:31:00 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of flamefew@gmail.com designates 66.249.92.174 as permitted sender) Received: from [66.249.92.174] (HELO ug-out-1314.google.com) (66.249.92.174) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jul 2006 13:30:59 -0700 Received: by ug-out-1314.google.com with SMTP id m2so1517041uge for ; Fri, 21 Jul 2006 13:30:38 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fgfjbnyhGGi2FV7GDMzGSa4rIVL2fOrXRO49cee5mcnEJs7IuVP2mEEgvYCZpJEziMr1af76HJDZ+xNFCclfnEzCBJOBOXvC20Kn22WvFeeXvYE7Oe7Qodewyk9iaaOQtSRPO6+KhCFUbCuaBb1AOcxBvxWQt3DhVZ2inq0fAbE= Received: by 10.78.185.7 with SMTP id i7mr599189huf; Fri, 21 Jul 2006 13:30:38 -0700 (PDT) Received: by 10.78.128.13 with HTTP; Fri, 21 Jul 2006 13:30:38 -0700 (PDT) Message-ID: <31cc37360607211330g3641704cqb5482689dee96c30@mail.gmail.com> Date: Fri, 21 Jul 2006 13:30:38 -0700 From: "Henri Yandell" To: "Jakarta Commons Developers List" Subject: Re: [finder] Switch from java.util.FileFilter to Commons IO's IOFileFilter In-Reply-To: <55afdc850607211222p5381c44v3779c6ff0802c024@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <55afdc850607211222p5381c44v3779c6ff0802c024@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Makes a lot of sense to me - +1. On 7/21/06, Niall Pemberton wrote: > Having separated out the FileFilter implementations I then went off > and had a look at what Commons IO provided. Their IOFileFilter > interface is a combination of the java.io.FileFilter and > java.io.FilenameFilter interfaces and they have a number of > implementations that we could use in place of those in Finder. Plus > I've submitted 4 new ones to Commons IO: > > http://issues.apache.org/jira/browse/IO-85 > > Also on the horizon is a Regex implementation whenever IO moves to JDK 1.4: > > http://issues.apache.org/jira/browse/IO-74 > > Potentially then we could get rid of most of our implementations and > use the IO ones: > > CompositeFilter --> AndFileFilter / OrFileFilter (now) > CanReadFilter ---> CanReadFileFilter (IO-85 submitted to IO) > CanWriteFilter ---> CanWriteFileFilter (IO-85 submitted to IO) > EmptyFilter ---> EmptyFileFilter (IO-85 submitted to IO) > HiddenFilter ---> HiddenFileFilter (IO-85 submitted to IO) > MinFilter ---> AgeFileFilter (now) > TimeFilter --> AgeFileFilter (now) > NewerFilter --> AgeFileFilter (now) > NameFilter ---> WildcardFileFilter (IO 1.3) > RegexFilter --> RegexFileFilter (IO-74 submitted to IO) > TypeFilter ---> DirectoryFileFilter (plus NotFileFilter) (now) > > There is a SizeFileFilter in IO, but it doesn't work exactly the same > way as SizeFilter. The only other imlementation is PathFilter which > doesn't have an equivalent in Commons IO. > > Anyway the upshot of it is I think we should switch finder from using > java.util.FileFilter to IOFileFilter and plug in the implementations > that are currently available in IO 1.2. > > Any objections? > > Niall > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org