ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: AW: use fileinfo in ant
Date Tue, 07 Dec 2004 20:54:31 GMT
--- lists@bitfaeule.net wrote:
[SNIP]
> I first need to delete all the files in the
> directories, then I delete
> all the empty folders, here is my code:

If you care to go beyond basic Ant, you could use
ant-contrib's <for>:

(having tied the "ac" ns to the antcontrib antlib)

<ac:for param="d">
  <dirset dir="${release}">
    <date datetime="${sevenDaysAgo}" when="before" />
  </dirset>
  <sequential>
    <delete dir="@{d}" />
  </sequential>
</ac:for>

This version presumes that the timestamps on the
directories themselves are reliable for your purposes.
 In all honesty I don't completely understand the
timestamps of directories but your question seemed to
imply that you were looking for a solution of this
nature.

Hope it helps,
Matt


	
		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message