From d4b13dc3238d7b35d351a9aeb001e3788534cd53 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Thu, 4 Sep 2008 13:20:19 +0000 Subject: [PATCH] re-generate site git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@692003 13f79535-47bb-0310-9956-ffa450edef68 --- docs/faq.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/faq.html b/docs/faq.html index 4ca8174c8..a30f338d0 100644 --- a/docs/faq.html +++ b/docs/faq.html @@ -290,6 +290,10 @@
  • How can I delete everything beneath a particular directory, preserving the directory itself? +
  • +
  • + How can I delete a particular directory, + if and only if it is empty?
  • It doesn't work (as expected)

    @@ -1166,6 +1170,22 @@ shell-prompt> m4 foo.m4 > foo <delete includeemptydirs="true"> <fileset dir="dirtokeep" includes="**/*" /> </delete> + +

    + + How can I delete a particular directory, + if and only if it is empty? +

    +

    Most users who go down this path have no problem figuring + out that + <delete includeemptydirs="true" /> 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:

    +
    +<delete includeemptydirs="true">
    +  <fileset dir="dirtokeepifnotempty" excludes="**/*" />
    +</delete>