ftp-client

Crates.ioftp-client
lib.rsftp-client
version0.1.2
sourcesrc
created_at2019-11-09 19:55:05.062872
updated_at2019-12-03 17:43:41.277634
descriptionA FTP client library
homepage
repositoryhttps://github.com/aaneto/ftp-client
max_upload_size
id179757
size64,703
Adilson Neto (aaneto)

documentation

README

ftp-client

coverage status quality gate tests

codecov Documentation crates.io

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(())
}

Running tests

To run all tests a few dependencies are needed, you need to run the docker image contained in "sample-server", like below:

Building the image

cd sample-server
docker build . -t ftp-server

Running the image on the background

docker run -d -p 20:20 -p 21:21 -p 2558:2558 -p 2559:2559 ftp-server

After that, you can run cargo test as you normally would.

Commit count: 78

cargo fmt