Common Test specific layer on top of OTP ftp clinet ftp.erl
cd(Connection, Dir) -> ok | {error, Reason}
Types:
Connection = connection()
Dir = string()
close(Connection) -> ok | {error, Reason}
Types:
Connection = connection()
delete(Connection, File) -> ok | {error, Reason}
Types:
Connection = connection()
File = string()
get(Name, RemoteFile, LocalFile) -> ok | {error, Reason}
Types:
Name = target_name()
RemoteFile = string()
LocaFile = string()
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.
ls(Connection, Dir) -> {ok, Listing} | {error, Reason}
Types:
Connection = connection()
Dir = string()
Listing = string()
open(Name) -> {ok, Handle} | {error, Reason}
Types:
Name = target_name() (see module ct)
Handle = handle()
put(Name, LocalFile, RemoteFile) -> ok | {error, Reason}
Types:
Name = target_name()
LocaFile = string()
RemoteFile = string()
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}]}.
recv(Connection, RemoteFile) -> ok | {error, Reason}
recv(Connection, RemoteFile, LocalFile) -> ok | {error, Reason}
Types:
Connection = connection()
RemoteFile = string()
LocaFile = string()
send(Connection, LocalFile) -> ok | {error, Reason}
send(Connection, LocalFile, RemoteFile) -> ok | {error, Reason}
Types:
Connection = connection()
LocaFile = string()
RemoteFile = string()
type(Connection, Type) -> ok | {error, Reason}
Types:
Connection = connection()
Type = ascii | binary