Simple FTP client for Elixir.
Use like this:
pid = ExFtp.open("ftp.targetdomain.com", "foo_user", "bar_password")
ExFtp.cd(pid, "/mydir")
list = ExFtp.ls()
assert list == [%{name: "foobar.txt", type: :file}, %{name: "subdir", type: :directory}]
If available in Hex, the package can be installed as:
- Add
ftp
to your list of dependencies inmix.exs
:
```elixir
def deps do
[{:exftp, github: 'mlankenau/exftp'}]
end
```
- Ensure
ftp
is started before your application:
```elixir
def application do
[applications: [:exftp]]
end
```