Here is an example that shows how to use the Erlang FTP client library in the official Erlang documentation . Here's the (unverified) translation in Elixir:
:inets.start
{:ok, pid} = :inets.start(:ftpc, host: 'erlang.org')
:ftp.user(pid, 'guest', 'password')
:ftp.pwd(pid)
:ftp.cd(pid, 'appl/examples')
:ftp.lpwd(pid)
:ftp.lcd(pid, '/home/eproj/examples')
:ftp.recv(pid, 'appl.erl')
:inets.stop(:ftpc, pid)
source
share