Return-Path: Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 64599 invoked by uid 500); 30 Aug 2000 14:00:26 -0000 Delivered-To: apmail-jakarta-ant-cvs@apache.org Received: (qmail 64586 invoked by uid 1142); 30 Aug 2000 14:00:24 -0000 Date: 30 Aug 2000 14:00:24 -0000 Message-ID: <20000830140024.64576.qmail@locus.apache.org> From: conor@locus.apache.org To: jakarta-ant-cvs@apache.org Subject: cvs commit: jakarta-ant/docs index.html conor 00/08/30 07:00:20 Modified: docs index.html Log: Update to FTP dtask documentation Submitted by: Glenn McAllister Revision Changes Path 1.83 +71 -11 jakarta-ant/docs/index.html Index: index.html =================================================================== RCS file: /home/cvs/jakarta-ant/docs/index.html,v retrieving revision 1.82 retrieving revision 1.83 diff -u -r1.82 -r1.83 --- index.html 2000/08/21 14:41:11 1.82 +++ index.html 2000/08/30 14:00:17 1.83 @@ -3859,10 +3859,9 @@

FTP

Description:

-

Copies files from the local system to a remote ftp server.

-

The fileset syntax must be used for specifying the local -files to copy. All filesets will be copied into the single remote directory -specified by remotedir.

+

The ftp task implements a basic FTP client that can send, receive, +list, and delete files. See below for descriptions and examples of how +to perform each task.

The ftp task makes no attempt to determine what file system syntax is required by the remote server, and defaults to Unix standards. remotedir must be specified in the exact syntax required by the ftp @@ -3908,8 +3907,9 @@ action - the ftp action to perform. - Current only supports"put" + the ftp action to perform, defaulting to "send". + Currently supports"put", "get", + "del", and "list". No @@ -3942,14 +3942,22 @@ Defaults to "/". No + + listing + the file to write results of the "list" action. + Required for the "list" action, ignored otherwise. + No + -

Examples

-
  <ftp server="ftp.apache.org"
  +

Sending Files

+

The easiest way to describe how to send files is with a couple of examples:

+
  +  <ftp server="ftp.apache.org"
          userid="anonymous"
  -       password="me@myorg.com"
  -  >
  +       password="me@myorg.com">
       <fileset dir="htdocs/manual" />
  -  </ftp>
+ </ftp> +

Logs in to ftp.apache.org as anonymous and uploads all files in the htdocs/manual directory to the default directory for that user.

@@ -3998,6 +4006,58 @@ HTML files in the htdocs/manual directory to the c:\uploads directory. Progress messages are displayed as each file is uploaded.

+

Getting Files

+

Getting files from an FTP server works pretty much the same way as +sending them does. The only difference is that the nested filesets +use the remotedir attribute as the base directory for the files on the +FTP server, and the dir attribute as the local directory to put the files +into. The file structure from the FTP site is preserved on the local machine.

+
  +  <ftp action="get"
  +       server="ftp.apache.org"
  +       userid="anonymous"
  +       password="me@myorg.com">
  +    <fileset dir="htdocs/manual" >
  +      <include name="**/*.html" />
  +    </fileset>
  +  </ftp>
  +
+

Logs in to ftp.apache.org as anonymous and +recursively downloads all .html files from default directory for that user +into the htdocs/manual directory on the local machine.

+

Deleting Files

+As you've probably guessed by now, you use nested fileset elements to +select the files to delete from the remote FTP server. Again, the +filesets are relative to the remote directory, not a local directory. In +fact, the dir attribute of the fileset is ignored completely. +
  +  <ftp action="del"
  +       server="ftp.apache.org"
  +       userid="anonymous"
  +       password="me@myorg.com" >
  +    <fileset>
  +      <include name="**/*.tmp" />
  +    </fileset>
  +  </ftp>
  +
+

Logs in to ftp.apache.org as anonymous and +tries to delete all *.tmp files from the default directory for that user. +If you don't have permission to delete a file, a BuildException is thrown.

+

Listing Files

+
  +  <ftp action="list"
  +       server="ftp.apache.org"
  +       userid=quot;anonymous"
  +       password="me@myorg.com" 
  +       listing="data/ftp.listing" >
  +    <fileset>
  +      <include name="**" />
  +    </fileset>
  +  </ftp>
  +
+

This provides a file listing in data/ftp.listing of all the files on +the FTP server relative to the default directory of the anonymous +user. �The listing is in whatever format the FTP server normally lists files.


NetRexxC

Description: