ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peter.rei...@corvil.com>
Subject Re: Deleting only the contents of a directory
Date Tue, 22 Jun 2004 14:58:23 GMT
Good idea,
It will be in the next ant release.

Peter
Ivan Ivanov wrote:

>Thanks Peter,
>
>Actually I finally guessed it and I did it late at
>home. I think also that, if it was hard for me it
>might be hard for someone else to, so I am submitting
>a patch to the docs of the <delete> task. The patch is
>done against latest CVS HEAD revision and adds at the
>bottom of the delete.html the snippet
>
>  <delete includeemptydirs="true">
>    <fileset dir="build" includes="**/*"/>
>  </delete>
>
>deletes all files and subdirectories of build, without
>build itself.
>
>Thank you very much again for your help.
>
>Regards Ivan
>
>P.S. I hope the patch will be accepted, so that I do
>not memorize the above snippet. I remember I wrote
>some docs about <selector>s and sent it, but it never
>appeared in the ant official docs.
>
>--- Peter Reilly <peter.reilly@corvil.com> wrote:
>  
>
>>Opps,
>>that should be:
>>   <delete includeEmptyDirs="yes">
>>     <fileset dir="dir" includes="**/*"/>
>>   </delete>
>>
>>    
>>
>
>
>		
>__________________________________
>Do you Yahoo!?
>Yahoo! Mail - 50x more storage than other providers!
>http://promotions.yahoo.com/new_mail
>
>------------------------------------------------------------------------
>
>161a162,167
>  
>
>><pre>  &lt;delete includeemptydirs=&quot;true&quot;&gt;
>>    &lt;fileset dir=&quot;build&quot; includes=&quot;**/*&quot;/&gt;
>>  &lt;/delete&gt;
>></pre>
>><p>deletes all files and subdirectories of <code>build</code>, without
>><code>build</code> itself.</p>
>>    
>>
>
>  
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>


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


Mime
View raw message