Simple FTP client for Gleam.
  • Gleam 82.5%
  • Erlang 14.5%
  • Shell 3%
Find a file
2025-11-09 13:37:02 +10:00
birdie_snapshots update gnu_server_test snapshot 2025-11-09 13:36:22 +10:00
src suppress tls module log messages 2025-11-09 13:36:22 +10:00
test add tests using test.rebex.net 2025-11-09 13:36:23 +10:00
.gitignore separate vsftpd log files 2025-11-09 13:37:02 +10:00
gleam.toml version 0.3.0 2025-11-09 13:37:02 +10:00
LICENSE.txt Apache 2.0 License 2024-09-29 01:50:19 +10:00
README.md remove lines from readme 2025-11-09 13:36:23 +10:00
run_tests.sh separate vsftpd log files 2025-11-09 13:37:02 +10:00

FTPasta

Package Version Hex Docs

A simple wrapper around Erlang's built-in ftp module.

Example Usage

gleam add ftpasta
import ftpasta
import ftpasta/tls_config
import gleam/io
import gleam/list

pub fn main() {
  // Connect to a server.
  let assert Ok(connection) =
    ftpasta.new("ftp.gnu.org")
    |> ftpasta.encryption(tls_config.Plaintext)
    |> ftpasta.connect()

  // List the files.
  let assert Ok(items) = ftpasta.list(connection, "")
  list.map(items, fn(item) { io.println(item.name) })

  // Close the connection.
  ftpasta.close(connection)
}

Development

The included script run_tests.sh will start two instances of vsftpd with the required configuration, run all tests, and then shut the servers down.