rust-ftp
FTP client for Rust
Installation
Add ftp via your Cargo.toml
[]
= "*"
FTPS support is disabled by default. To enable it secure
should be activated in Cargo.toml
.
[]
= { = "*", = ["secure"] }
Usage
extern crate ftp;
use str;
use Cursor;
use FtpStream;
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Development environment
All you need to develop rust-ftp and run the tests is Rust and Docker.
The tests
folder contains a Dockerfile
that installs and configures
the vsftpd server.
To create the Docker image:
To start the FTP server that is tested against:
This script runs the ftp-server
image in detached mode and starts the vsftpd
daemon. It binds ports 21 (FTP) as well as the range 65000-65010 for passive connections.
Once you have an instance running, to run tests type:
The following commands can be useful:
# List running containers of ftp-server image
# (to include stopped containers use -a option)
# To stop and remove a container
# To remove the image