Skip to content

aaneto/ftp-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

docker build . -t ftp-server -f sample-server/Dockerfile

Running the image on the background

docker run -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.

About

A rust FTP client implementation.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages