Lines 66-72
Link Here
|
66 |
<td valign="top">action</td> |
66 |
<td valign="top">action</td> |
67 |
<td valign="top">the ftp action to perform, defaulting to "send". |
67 |
<td valign="top">the ftp action to perform, defaulting to "send". |
68 |
Currently supports "put", "get", |
68 |
Currently supports "put", "get", |
69 |
"del", "list", "chmod" and "mkdir".</td> |
69 |
"del", "list", "chmod", |
|
|
70 |
"mkdir" and "rmdir".</td> |
70 |
<td valign="top" align="center">No</td> |
71 |
<td valign="top" align="center">No</td> |
71 |
</tr> |
72 |
</tr> |
72 |
<tr> |
73 |
<tr> |
Lines 262-267
Link Here
|
262 |
<p>This creates the directory <code>some/remote/dir</code> beneath the default root |
263 |
<p>This creates the directory <code>some/remote/dir</code> beneath the default root |
263 |
directory. As with all other actions, the directory separator character must be correct |
264 |
directory. As with all other actions, the directory separator character must be correct |
264 |
according to the desires of the FTP server.</p> |
265 |
according to the desires of the FTP server.</p> |
|
|
266 |
<h3>Removing Directories</h3> |
267 |
This action uses nested fileset elements to |
268 |
select the directories to remove from the remote FTP server. The |
269 |
filesets are relative to the remote directory, not a local directory. |
270 |
The dir attribute of the fileset is ignored completely. |
271 |
The directories to be removed must be empty, or contain only |
272 |
other directories that have been also selected to be removed by the filesets |
273 |
patterns, otherwise a BuildException will be thrown. |
274 |
Also, if you don't have permission to remove a directory, a BuildException is |
275 |
thrown. |
276 |
|
277 |
<pre> |
278 |
<ftp action="rmdir" |
279 |
server="ftp.apache.org" |
280 |
userid="anonymous" |
281 |
password="me@myorg.com" |
282 |
remotedir="/somedir" > |
283 |
<fileset> |
284 |
<include name="dira"/> |
285 |
<include name="dirb/**"/> |
286 |
</fileset> |
287 |
</ftp> |
288 |
</pre> |
289 |
<p>Logs in to <code>ftp.apache.org</code> as <code>anonymous</code> and |
290 |
tries to remove <code>/somedir/dira</code> directory and |
291 |
all the directories tree starting at, and including, <code>/somedir/dirb</code>. |
292 |
When removing the <code>/somedir/dirb</code> tree, |
293 |
it will start at the leaves moving up to the root, so that when |
294 |
it tries to remove a directory it is sure all the directories under it are |
295 |
already removed. |
296 |
Obviuosly all the files in the tree must have been already deleted. |
297 |
</p> |
298 |
<p>As an example suppose you want to delete everything contained into |
299 |
<code>/somedir</code>, so invoke first the <code><ftp></code> task with |
300 |
<code>action="delete"</code>, then with |
301 |
<code>action="rmdir"</code> specifying in both cases |
302 |
<code>remotedir="/somedir"</code> and |
303 |
|
304 |
<pre> |
305 |
<fileset> |
306 |
<include name="**"/> |
307 |
</fileset> |
308 |
</pre> |
309 |
|
310 |
The directory specified in the <code>remotedir</code> parameter is never |
311 |
selected for remove, so if you need to remove it, specify its parent in |
312 |
<code>remotedir</code> parameter and include it in the |
313 |
<code><fileset></code> pattern, like <code>"somedir/**"</code>. |
314 |
</p> |
265 |
<hr> |
315 |
<hr> |
266 |
<p align="center">Copyright © 2000-2002 Apache Software Foundation. All rights |
316 |
<p align="center">Copyright © 2000-2002 Apache Software Foundation. All rights |
267 |
Reserved.</p> |
317 |
Reserved.</p> |