Crate ftp_client

Source
Expand description

This crate is my attempt at writting a FTP sync client using Rust, it should contain most commands useful to a regular client with ease of use. Additional internal functionality is also exposed to avoid limiting the user to the current implementation.

Listing the files on the current working directory looks like below when using this crate:

use ftp_client::prelude::*;

fn main() -> Result<(), ftp_client::error::Error> {
    let mut client = Client::connect("test.rebex.net", "demo", "password")?;
    let names = client.list_names("/")?;
    println!("Listing names: ");
    for name in names {
        println!("{}", name);
    }
    Ok(())
}

Modulesยง

client
Implement the Client and most actual functionality for it.
error
Define errors that can happend by using the ftp-rs crate.
prelude
The prelude module contains some useful default imports.
status_code
Contains code for using and parsing FTP status codes.