ct_ftp
MODULE
MODULE SUMMARY
DESCRIPTION
FTP client module (based on the FTP support of the INETS application).
DATA TYPES
EXPORTS
cd(Connection, Dir) -> ok | {error, Reason}
Types:
close(Connection) -> ok | {error, Reason}
Types:
delete(Connection, File) -> ok | {error, Reason}
Types:
get(KeyOrName, RemoteFile, LocalFile) -> ok | {error, Reason}
Types:
Open a ftp connection and fetch a file from the remote host.
RemoteFile and LocalFile must be absolute paths.
The config file must be as for put/3.
See also: put/3, ct:require/2.
ls(Connection, Dir) -> {ok, Listing} | {error, Reason}
Types:
open(KeyOrName) -> {ok, Handle} | {error, Reason}
Types:
Open an FTP connection to the specified node.
You can open one connection for a particular Name and use the same name as reference for all subsequent operations. If you want the connection to be associated with Handle instead (in case you need to open multiple connections to a host for example), simply use Key, the configuration variable name, to specify the target. Note that a connection that has no associated target name can only be closed with the handle value.
See ct:require/2 for how to create a new Name
See also: ct:require/2.
put(KeyOrName, LocalFile, RemoteFile) -> ok | {error, Reason}
Types:
Open a ftp connection and send a file to the remote host.
LocalFile and RemoteFile must be absolute paths.
If the target host is a "special" node, the ftp address must be specified in the config file like this:
{node,[{ftp,IpAddr}]}.
If the target host is something else, e.g. a unix host, the config file must also include the username and password (both strings):
{unix,[{ftp,IpAddr}, {username,Username}, {password,Password}]}.
See also: ct:require/2.
recv(Connection, RemoteFile) -> ok | {error, Reason}
recv(Connection, RemoteFile, LocalFile) -> ok | {error, Reason}
Types:
send(Connection, LocalFile) -> ok | {error, Reason}
send(Connection, LocalFile, RemoteFile) -> ok | {error, Reason}
Types:
type(Connection, Type) -> ok | {error, Reason}
Types: