FTP clients are considered to be rather temporary. Thus,
they are only started and stopped during runtime and cannot
be started at application startup.
The FTP client API is designed to allow some functions to
return intermediate results. This implies that only the process
that started the FTP client can access it with
preserved sane semantics. (This can be solved
by changing the API, using the concept of a controlling
process as with other OTP applications, but
that is something for future releases of
The client supports IPv6 as long as the underlying mechanisms also do so.
The following is a simple example of an FTP session, where
the user
inets:start().
ok
2> {ok, Pid} = inets:start(ftpc, [{host, "erlang.org"}]).
{ok,<0.22.0>}
3> ftp:user(Pid, "guest", "password").
ok
4> ftp:pwd(Pid).
{ok, "/home/guest"}
5> ftp:cd(Pid, "appl/examples").
ok
6> ftp:lpwd(Pid).
{ok, "/home/fred"}.
7> ftp:lcd(Pid, "/home/eproj/examples").
ok
8> ftp:recv(Pid, "appl.erl").
ok
9> inets:stop(ftpc, Pid).
ok
]]>
The file