From 36682adc290eebeb7dcdcb065a2434886625f603 Mon Sep 17 00:00:00 2001 From: Jan Materne Date: Thu, 6 Jul 2006 05:57:55 +0000 Subject: [PATCH] Add example using the default excludes. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@419449 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/CoreTasks/delete.html | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/docs/manual/CoreTasks/delete.html b/docs/manual/CoreTasks/delete.html index 579c82bd2..b8ab21b29 100644 --- a/docs/manual/CoreTasks/delete.html +++ b/docs/manual/CoreTasks/delete.html @@ -22,11 +22,11 @@ collection types that do include directories, but that no attempt will be made to delete non-empty directories in any case.

If you use this task to delete temporary files created by editors -and it doesn't seem to work, read up on the +and it doesn't seem to work, read up on the default exclusion set in Directory-based Tasks, and see the defaultexcludes attribute below. - +

Parameters

@@ -69,7 +69,7 @@ in Directory-based Tasks, and see the -debug switches) or modify the exit status to reflect an error. When set to "true", if a file or directory cannot be deleted, - no error is reported. This setting emulates the + no error is reported. This setting emulates the -f option to the Unix rm command. Setting this to "true" implies setting failonerror to "false". @@ -137,33 +137,45 @@ in Directory-based Tasks, and see the
No, default "false"
+

Examples

  <delete file="/lib/ant.jar"/>

deletes the file /lib/ant.jar.

  <delete dir="lib"/>
-

deletes the lib directory, including all files +

deletes the lib directory, including all files and subdirectories of lib.

+
  <delete>
     <fileset dir="." includes="**/*.bak"/>
   </delete>
 
-

deletes all files with the extension .bak from the current directory +

deletes all files with the extension .bak from the current directory and any subdirectories.

+
  <delete includeEmptyDirs="true">
     <fileset dir="build"/>
   </delete>
 

deletes all files and subdirectories of build, including build itself.

+
  <delete includeemptydirs="true">
     <fileset dir="build" includes="**/*"/>
   </delete>
 

deletes all files and subdirectories of build, without build itself.

-

Copyright © 2000-2002, 2004-2005 The Apache Software Foundation. + +

  <delete defaultexcludes="false">
+    <fileset dir="src" includes="**/.svn"/>
+  </delete>
+
+

deletes the subversion metadata directories under src. Because .svn +is on of the default excludes you have to use the +defaultexcludes flag, otherwise Ant wont delete these directories and the files in it.

+ +

Copyright © 2000-2002, 2004-2006 The Apache Software Foundation. All rights Reserved.

-