You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2008/09/04 15:12:48 UTC
svn commit: r692000 - in /ant/core/trunk: CONTRIBUTORS contributors.xml
xdocs/faq.xml
Author: bodewig
Date: Thu Sep 4 06:12:47 2008
New Revision: 692000
URL: http://svn.apache.org/viewvc?rev=692000&view=rev
Log:
add FAQ about deleting a directory only if it is empty. PR 44013. submitted by Vincent Legoll
Modified:
ant/core/trunk/CONTRIBUTORS
ant/core/trunk/contributors.xml
ant/core/trunk/xdocs/faq.xml
Modified: ant/core/trunk/CONTRIBUTORS
URL: http://svn.apache.org/viewvc/ant/core/trunk/CONTRIBUTORS?rev=692000&r1=691999&r2=692000&view=diff
==============================================================================
Binary files - no diff available.
Modified: ant/core/trunk/contributors.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/contributors.xml?rev=692000&r1=691999&r2=692000&view=diff
==============================================================================
--- ant/core/trunk/contributors.xml (original)
+++ ant/core/trunk/contributors.xml Thu Sep 4 06:12:47 2008
@@ -1172,6 +1172,10 @@
<last>Toni</last>
</name>
<name>
+ <first>Vincent</first>
+ <last>Legoll</last>
+ </name>
+ <name>
<first>Will</first>
<last>Wang</last>
</name>
Modified: ant/core/trunk/xdocs/faq.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/xdocs/faq.xml?rev=692000&r1=691999&r2=692000&view=diff
==============================================================================
--- ant/core/trunk/xdocs/faq.xml (original)
+++ ant/core/trunk/xdocs/faq.xml Thu Sep 4 06:12:47 2008
@@ -720,6 +720,25 @@
]]></source>
</answer>
</faq>
+
+ <faq id="delete-directory-only-if-empty">
+ <question>How can I delete a particular directory,
+ if and only if it is empty?</question>
+ <answer>
+ <p>Most users who go down this path have no problem figuring
+ out that
+ <code><delete includeemptydirs="true" /></code> will
+ help them. The seemingly tricky part is preserving the
+ non-empty directories, which Ant includes in the directory
+ scan. Fortunately the answer is simple:</p>
+
+ <source><![CDATA[
+<delete includeemptydirs="true">
+ <fileset dir="dirtokeepifnotempty" excludes="**/*" />
+</delete>
+]]></source>
+ </answer>
+ </faq>
</faqsection>
<faqsection title="It doesn't work (as expected)">