Hi,

I've done a small start for the ftp task. Well, it's a small
start.  Basicly I'm capable of downloading / uploading one
file at a time.

I used code from
http://sourceforge.net/projects/dotnetftpclient/ to get this
tasks running. My tests run smoothly, but there are some
features that are missing to call this complete. I post it
here, because this work could complement the release plan,
so if you're interested in taking this into the nant sources
- take it. This doesn't mean I wouldn't participate further
in developing this tasks ;).

I splitted the ftp into ftpdown and ftpup, that made the
start easier. And IMHO two tasks are easier than one task
with a switch.

Some errorhandling is missing (no connection to server). So
expect it to crash hard if something does'nt run as
expected.

Here is a short overview of what is implemented right now:

ftpup task
----------

optional attributes:
        * user
          defaulting to anonymous
        * password
          defaulting to [EMAIL PROTECTED]
        * remotefile
          Give a path and file name for remote server

required attributes:
        * file
          local file to upload
        * server
          server to upload to

ftpdown task
------------

optional attributes:
        * user
          defaulting to anonymous
        * password
          defaulting to [EMAIL PROTECTED]
        * file
          how to save file

required attributes:
        * server
          server to upload to
        * remotefile 
          what file to download

The folowing points are open but known how to implement:
        - ftp mode  (active/passive)
        - file mode (binary / ascii)
        - fileset               (download/upload more than one file

Currently I'm not sure how to implement a complete ftp
script, that is doing more than one ftp command (create dir,
delete file, etc) without reconnecting everytime. I could
imagine something like a fileset for implementing custom ftp
commands, but I'm not yet sure about this. I tend to give
that task a name of it's own - say ftpscript. In my personal
priority list it's last, since I need upload most and
downloading a file is somehow the same.

The used ftp code and the task code can be downloaded (url
see below). There are no binaries in it (neither for the ftp
library nor for the nant tasks). But there are build scripts
in the subdirectories. Those scripts should be
self-explanatory.

You can download the code at
http://www.livingit.de/downloads/nant-tasks.zip

Comments and reactions welcome,

Sascha
-- 
sa at programmers-world dot com http://www.livingit.de
Internet sites:
  http://www.not2long.net - Make long links short
  Boomarks online: http://www.mobile-bookmarks.info


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to