--- ftp.html.orig Wed Sep 18 08:16:02 2002 +++ ftp.html Wed Sep 18 12:56:12 2002 @@ -66,7 +66,8 @@
This creates the directory some/remote/dir
beneath the default root
directory. As with all other actions, the directory separator character must be correct
according to the desires of the FTP server.
+ <ftp action="rmdir" + server="ftp.apache.org" + userid="anonymous" + password="me@myorg.com" + remotedir="/somedir" > + <fileset> + <include name="dira"/> + <include name="dirb/**"/> + </fileset> + </ftp> ++
Logs in to ftp.apache.org
as anonymous
and
+tries to remove /somedir/dira
directory and
+all the directories tree starting at, and including, /somedir/dirb
.
+When removing the /somedir/dirb
tree,
+it will start at the leaves moving up to the root, so that when
+it tries to remove a directory it is sure all the directories under it are
+already removed.
+Obviuosly all the files in the tree must have been already deleted.
+
As an example suppose you want to delete everything contained into
+/somedir
, so invoke first the <ftp>
task with
+action="delete"
, then with
+action="rmdir"
specifying in both cases
+remotedir="/somedir"
and
+
+
+ <fileset> + <include name="**"/> + </fileset> ++ +The directory specified in the
remotedir
parameter is never
+selected for remove, so if you need to remove it, specify its parent in
+remotedir
parameter and include it in the
+<fileset>
pattern, like "somedir/**"
.
+
Copyright © 2000-2002 Apache Software Foundation. All rights Reserved.