ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Rosenberg" <ja...@squaretrade.com>
Subject Re: How to check for empty directory
Date Sun, 24 Dec 2000 21:05:05 GMT
Can you elaborate what you mean by a 'script-task'?

In general, I want to be able to handle the case where I don't
necessarily know all the files that might be there, but I just
want to check if anything at all is there.

I tried doing something like:

<available file="*" property="dirNotEmpty"/>

But the <available> task doesn't seem to be interested in expanding
wildcards.  Also, <available> doesn't except a nested <fileset>.

So, I don't see how to use a fileset with the <available> task.

Any other ideas?

Jason
  ----- Original Message ----- 
  From: Nico Seessle 
  To: ant-dev@jakarta.apache.org 
  Sent: Sunday, December 24, 2000 5:47 AM
  Subject: Re: How to check for empty directory


  Maybe you can use a fileset (including all files in this dir) and a script-task to test
if the included files are "0"? 

  Don't have used something like this, just an idea...

  Nico

  ----- Original Message ----- 
    From: Jason Rosenberg 
    To: ant-user@jakarta.apache.org ; ant-dev@jakarta.apache.org 
    Sent: Sunday, December 24, 2000 8:06 AM
    Subject: How to check for empty directory


    Hello,

    I have been trying to figure out a way to detect
    using the Ant basics, whether a directory is empty.

    Any ideas?

Mime
View raw message