Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 38718 invoked from network); 10 Oct 2007 06:45:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Oct 2007 06:45:20 -0000 Received: (qmail 32261 invoked by uid 500); 10 Oct 2007 06:45:04 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 32221 invoked by uid 500); 10 Oct 2007 06:45:04 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 32210 invoked by uid 99); 10 Oct 2007 06:45:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2007 23:45:04 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Oct 2007 06:45:06 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IfVJG-0005jX-1c for user@ant.apache.org; Tue, 09 Oct 2007 23:44:46 -0700 Message-ID: <13130373.post@talk.nabble.com> Date: Tue, 9 Oct 2007 23:44:46 -0700 (PDT) From: nissea To: user@ant.apache.org Subject: Re: Check if a directory is empty In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: nils.asp@ngai.se References: <13118887.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org OK, Thank you so much! David Weintraub wrote: > > Hmmm... > > You could create a PATH ID, then convert that over to a property, then > check that the property is not empty. The following build.xml has been > tested and checks for the presents of files in that directory. > However, it will report a directory as empty if it contains just empty > directories: > > > > > > > > > > > > > > if="empty.dir.flag"> > Directory "test.dir" is empty > > > depends="test1" > unless="empty.dir.flag"> > Directory "test.dir" is not empty > > > > I was seeing if there was someway to do this via a filterchange, but > couldn't see anyway. > > -- > David Weintraub > qazwart@gmail.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > > -- View this message in context: http://www.nabble.com/Check-if-a-directory-is-empty-tf4595246.html#a13130373 Sent from the Ant - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org