public class FtpTransferTask extends AbstractTask
Result of arguments will be as FTP command.
Format is the following:
"-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
ARCHPATH, BLANK, BLOCKSIZE, DATE, ERRORCODE, ERRORMSG, ERRORSTRCODE, FILESIZE, FULLTRANSFERID, HOMEPATH, HOUR, INPATH, LOCALEXEC, LOCALHOST, LOCALHOSTADDR, NOWAIT, ORIGINALFILENAME, ORIGINALFULLPATH, OUTPATH, RANKTRANSFER, REMOTEHOST, REMOTEHOSTADDR, REQUESTEDHOST, REQUESTERHOST, RULE, TRANSFERID, TRUEFILENAME, TRUEFULLPATH, WORKPATH
Constructor and Description |
---|
FtpTransferTask(String argRule,
int delay,
String argTransfer,
R66Session session) |
Modifier and Type | Method and Description |
---|---|
void |
run()
"-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]" |
getFutureCompletion, getReplacedValue, getType, isSuccess
public FtpTransferTask(String argRule, int delay, String argTransfer, R66Session session)
argRule
- delay
- argTransfer
- session
- public void run()
run
in interface Runnable
run
in class AbstractTask
Copyright © 2009–2020 Waarp. All rights reserved.