Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 87501 invoked from network); 6 Apr 2005 13:57:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Apr 2005 13:57:43 -0000 Received: (qmail 1803 invoked by uid 500); 6 Apr 2005 13:57:37 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 1484 invoked by uid 500); 6 Apr 2005 13:57:35 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 1468 invoked by uid 99); 6 Apr 2005 13:57:35 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from junior.lgc.com (HELO junior.lgc.com) (134.132.72.99) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 06 Apr 2005 06:57:34 -0700 Received: from lgchvw01.landmark.lgc.com (lgchvw01.lgc.com [134.132.93.107]) by junior.lgc.com (8.11.7/8.11.3) with SMTP id j36DvZu13382 for ; Wed, 6 Apr 2005 08:57:35 -0500 (CDT) Received: from 134.132.72.99 by lgchvw01.landmark.lgc.com (InterScan E-Mail VirusWall NT); Wed, 06 Apr 2005 08:57:27 -0500 Received: from HOUEXCH903.landmark.lgc.com (houexch903 [134.132.167.43]) by junior.lgc.com (8.11.7/8.11.3) with ESMTP id j36DvUN13359 for ; Wed, 6 Apr 2005 08:57:30 -0500 (CDT) Received: from HOUEXCH902.landmark.lgc.com ([134.132.167.38]) by HOUEXCH903.landmark.lgc.com with Microsoft SMTPSVC(6.0.3790.211); Wed, 6 Apr 2005 08:57:24 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Counting files in a dir Date: Wed, 6 Apr 2005 08:57:23 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Counting files in a dir Thread-Index: AcU6MylxY235tckUSj+OR8paCIE7FgAfMFFg From: "Dominique Devienne" To: "Ant Users List" X-OriginalArrivalTime: 06 Apr 2005 13:57:24.0501 (UTC) FILETIME=[8F6F2C50:01C53AB0] X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N > From: Fermin Da Costa Gomez [mailto:f.dacosta.g@gmail.com] > Maybe i did not explain my requirement well enough. > The thing is that i am looping through a series of dirs and *if* they > contain 1 or more TestStubs they need to be put in a suite. > ... > delimiter=3D"${path.separator}" /> > ... >=20 > > > .. Check how many files are stubs .. > > > > .. and go back to the caller, *no processing* > > Do some processing > > >=20 > The above snip is what i have in mind. Does it look sensible or am i > missing some significant ant thing ;-) The scenario you describe seem to point to file selectors. In Ant, you usually don't loop on dirs, doing some conditional processing within the loop, you select all the files to process using s, which with selectors can do this selection on just about any criteria, and then you process this list of files unconditionally. For example, since your example is around unit testing, I use with a , which contain s with custom selectors to select only some tests, based on various criteria. I'm not sure it applies to you, but I'd say it's the canonical way to do this kind of things in Ant. --DD --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org