-
protocol
(string) - communication protocol; possible values: 'ftp', 'sftp'; Default: 'ftp' -
client
(object) - connection configuration-
host
(string) - host name of the ftp server; Default: 'localhost' -
port
(string, integer) - listening port of the ftp server; Default: 21 -
secure
(bool/string) - encryption type, if false, the securityOptions will not be considered; possible values: 'control' for control connection encryption, 'implicit' for implicitly encrypted control connection, true for both, false for none; Default: false -
secureOptions
(object) - additional connection options; Default: (none)-
rejectUnauthorized
(boolean) - if false, denies the connection in case the certificate verification fails; Default: true (only if secure is not false) -
cert
(string) - certificate value, should include BEGIN and END tags -
key
(string) - private key
-
-
username
(string) - username for authentication; Default: 'anonymous' -
password
(string) - password for authentication; Default: 'anonymous@' -
connTimeout
(integer) - milliseconds to wait for establishing control connection; Default: 10000 -
pasvTimeout
(integer) - milliseconds to wait for establishing PASV data connection; Default: 10000 -
keepalive
(integer) - milliseconds between dummy commands to keep the connection alive; Default: 10000
-
NOTE: The protocol and the presence and need of key and certificate depend on the server configuration !
-
download
- download file through ftp -
upload
- upload file through ftp -
append
- append data to file through ftp; message structure:- data (string) - data to be appended
- fileName (string) - relative path and name of the file on the ftp server to which the data will be appended
-
list
- list all files within a folder on a remote ftp server -
remove
- remove a file through ftp -
rename
- rename/move a file on a remote ftp server