FtpClient

In order to enable more interactions with FTP servers, after having proposed the Waarp Gateway FTP, we now propose to integrate within the Waarp Gateway FTP and within the Waarp R66 the ability to use task (pre or post tasks) to send or receive a file through a FTP client (based on FTP4J). Note that the command will be synchronous.

 

For both Gateway FTP and R66, the argument will be as follow:

 

"-file filepath
-to requestedHost
-port port
-user user
-pwd pwd
[-account account]
[-mode active/passive]
[-ssl no/implicit/explicit]
[-cwd remotepath]
[-digest (crc,md5,sha1)]
[-pre extraCommand1 with ',' as separator of arguments]
-command command from (get,put,append)
[-post extraCommand2 with ',' as separator of arguments]"


The order of commands will be:

  1. connection to requestHost on port (if ssl native => using native ssl link)
  2. User user
  3. PASS pwd
  4. if account => ACCT account
  5. if -ssl & auth => AUTH, PBSZ 0, PROT P
  6. if passive => PASV
  7. CWD remotepath; if error => MKD remotepath then CWD remotepath (and ignoring any error)
  8. if pre => extraCommand1 with ',' replaced by ' ' (note: do not use standard commands from FTP like ACCT,PASS,REIN,USER,APPE,STOR,STOU,RETR,RMD,RNFR,RNTO,ABOR,CWD,CDUP,MODE,PASV,PORT,STRU,TYPE,MDTM,MLSD,MLST,SIZE,AUTH)
  9. BINARY (binary format)
  10. if get => RETR filepath.basename ; if put => STOR filepath ; if append => APPE filepath.basename
  11. if digest & get/put/append & remote site compatible with XCRC,XMD5,XSHA1 => FEAT (parsing if found corresponding XCRC,XMD5,XSHA1) ; then XCRC/XMD5/XSHA1 filepath.basename ; then locally comparing this XCRC/XMD5/XSHA1 with the local file
  12. if post => extraCommand2 with ',' replaced by ' ' (note: do not use standard commands from FTP like ACCT,PASS,REIN,USER,APPE,STOR,STOU,RETR,RMD,RNFR,RNTO,ABOR,CWD,CDUP,MODE,PASV,PORT,STRU,TYPE,MDTM,MLSD,MLST,SIZE,AUTH)
  13. QUIT