Browse Source

re-generate site

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@692003 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 17 years ago
parent
commit
d4b13dc323
1 changed files with 20 additions and 0 deletions
  1. +20
    -0
      docs/faq.html

+ 20
- 0
docs/faq.html View File

@@ -290,6 +290,10 @@
<li><a href="#delete-directory-children-only">
How can I delete everything beneath a particular directory,
preserving the directory itself?
</a></li>
<li><a href="#delete-directory-only-if-empty">
How can I delete a particular directory,
if and only if it is empty?
</a></li>
</ul>
<h4 class="toc">It doesn't work (as expected)</h4>
@@ -1166,6 +1170,22 @@ shell-prompt&gt; m4 foo.m4 &gt; foo
&lt;delete includeemptydirs=&quot;true&quot;&gt;
&lt;fileset dir=&quot;dirtokeep&quot; includes=&quot;**/*&quot; /&gt;
&lt;/delete&gt;
</pre>
<p class="faq">
<a name="delete-directory-only-if-empty"></a>
How can I delete a particular directory,
if and only if it is empty?
</p>
<p>Most users who go down this path have no problem figuring
out that
<code>&lt;delete includeemptydirs="true" /&gt;</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>
<pre class="code">
&lt;delete includeemptydirs=&quot;true&quot;&gt;
&lt;fileset dir=&quot;dirtokeepifnotempty&quot; excludes=&quot;**/*&quot; /&gt;
&lt;/delete&gt;
</pre>
<p class="faq">
<a name="general-advice"></a>


Loading…
Cancel
Save