source download ftp.lsp
Module: ftp.lsp
FTP file transfer routines
Version: 1.4 - comments redone for automatic documentation
Version: 1.5 - change in read-buffer for v.10.0
Version: 1.6 - change in net-receive for v.10.0
Version: 1.7 - doc changes
Version: 1.8 - write, read and compatibility with pre v10.1.11
Author: Eddie Rucker, Lutz Mueller, 2003-2010
FTP file transfer routines
To use the module put a load statement at beginning of your program file:(load "/usr/share/newlisp/modules/ftp.lsp") ; or shorter (module "ftp.lsp")In case of failure the functions return nil and further detail may be found in the variable FTP:result.
To set debug mode, which shows all dialog with the server, set FTP:debug-flag:
(set 'FTP:debug-flag true)§
FTP:get
syntax: (FTP:get str-user-id str-password str-host str-dir str-file-name)
parameter: str-user-id - The user ID for logon.
parameter: str-password - The password for the user ID.
parameter: str-host - The remote host name or IP as a string.
parameter: str-dir - The subdirectory on the host.
parameter: str-file-name - The name of the file to transfer.
return: true on success, nil on failure.
Example:When leaving the string for the sub directory empty, the current directory "." is assumed on the host.(FTP:get "somebody" "secret" "host.com" "subdir" "aFile.tgz") download (FTP:get "somebody" "secret" "192.168.1.120" "" "myfile.txt") download§
FTP:put
syntax: (FTP:put str-user-id str-password str-host str-dir str-file-name)
parameter: str-user-id - The user ID for logon.
parameter: str-password - The password for the user ID.
parameter: str-host - The remote host name or IP as a string.
parameter: str-dir - The sub directory on the host.
parameter: str-file-name - The name of the file to transfer.
return: true on success, nil on failure.
Example:(FTP:put "somebody" "secret" "host.com" "subdir" "file") upload- ∂ -
generated with newLISP and newLISPdoc