All Projects → mattnenterprise → Rust Ftp

mattnenterprise / Rust Ftp

Licence: other
FTP client for Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Rust Ftp

Drivebackupv2
Uploads Minecraft backups to Google Drive/OneDrive or by (S)FTP
Stars: ✭ 26 (-76.36%)
Mutual labels:  ftp, ftp-client
ftpConnect
A simple and robust dart FTP Client Library to interact with FTP Servers with possibility of zip and unzip files.
Stars: ✭ 43 (-60.91%)
Mutual labels:  ftp, ftp-client
publish-sftp
One-line command to quickly publish resources to a specified server
Stars: ✭ 41 (-62.73%)
Mutual labels:  ftp, ftp-client
Whipftp
OpenSource FTP / SFTP client
Stars: ✭ 158 (+43.64%)
Mutual labels:  ftp, ftp-client
Filestash
🦄 A modern web client for SFTP, S3, FTP, WebDAV, Git, Minio, LDAP, CalDAV, CardDAV, Mysql, Backblaze, ...
Stars: ✭ 5,231 (+4655.45%)
Mutual labels:  ftp, ftp-client
php-ftp-client
📦 Provides helper classes and methods to manage FTP files in an OOP way.
Stars: ✭ 81 (-26.36%)
Mutual labels:  ftp, ftp-client
Ftps
Implementation of the FTPS protocol for Golang.
Stars: ✭ 24 (-78.18%)
Mutual labels:  ftp, ftp-client
FTP
FTP客户端,服务端
Stars: ✭ 34 (-69.09%)
Mutual labels:  ftp, ftp-client
Google Drive Ftp Adapter
Google Drive FTP Adapter to connect to google drive through the FTP protocol
Stars: ✭ 292 (+165.45%)
Mutual labels:  ftp, ftp-client
fs2-ftp
Simple client for Ftp/Ftps/Sftp
Stars: ✭ 24 (-78.18%)
Mutual labels:  ftp, ftp-client
Fluentftp
An FTP and FTPS client for .NET & .NET Standard, optimized for speed. Provides extensive FTP commands, File uploads/downloads, SSL/TLS connections, Automatic directory listing parsing, File hashing/checksums, File permissions/CHMOD, FTP proxies, FXP support, UTF-8 support, Async/await support, Powershell support and more. Written entirely in C#,…
Stars: ✭ 1,943 (+1666.36%)
Mutual labels:  ftp, ftp-client
Ftp
FTP client package for Go
Stars: ✭ 785 (+613.64%)
Mutual labels:  ftp, ftp-client
Arduinosim800l
Arduino HTTP & FTP client for SIM800L/SIM800 boards to perform GET and POST requests to a JSON API as well as FTP uploads.
Stars: ✭ 127 (+15.45%)
Mutual labels:  ftp, ftp-client
EOSFTPServer
A project to create a complete, standard compliant, multi-user, Objective-C (Mac OS X / iOS) FTP server.
Stars: ✭ 35 (-68.18%)
Mutual labels:  ftp, ftp-client
Aioftp
ftp client/server for asyncio (http://aioftp.readthedocs.org)
Stars: ✭ 116 (+5.45%)
Mutual labels:  ftp, ftp-client
LaravelFtp
Laravel FTP client
Stars: ✭ 15 (-86.36%)
Mutual labels:  ftp, ftp-client
Jsftp
Light and complete FTP client implementation for Node.js
Stars: ✭ 766 (+596.36%)
Mutual labels:  ftp, ftp-client
Winscp
WinSCP is a popular free SFTP and FTP client for Windows, a powerful file manager that will improve your productivity. It supports also Amazon S3, FTPS, SCP and WebDAV protocols. Power users can automate WinSCP using .NET assembly.
Stars: ✭ 794 (+621.82%)
Mutual labels:  ftp, ftp-client
Squid
Squid Web Proxy Cache
Stars: ✭ 981 (+791.82%)
Mutual labels:  ftp
Davos
Web-based FTP automation for Linux servers.
Stars: ✭ 90 (-18.18%)
Mutual labels:  ftp

rust-ftp

FTP client for Rust

Number of Crate Downloads Crate Version Crate License Build Status Coverage Status

Documentation


Installation

FTPS support is achieved through rust-native-tls and is disabled by default. To enable it secure should be activated in Cargo.toml.

[dependencies]
ftp = { version = "<version>", features = ["secure"] }

Usage

extern crate ftp;

use std::str;
use std::io::Cursor;
use ftp::FtpStream;

fn main() {
    // Create a connection to an FTP server and authenticate to it.
    let mut ftp_stream = FtpStream::connect("127.0.0.1:21").unwrap();
    let _ = ftp_stream.login("username", "password").unwrap();

    // Get the current directory that the client will be reading from and writing to.
    println!("Current directory: {}", ftp_stream.pwd().unwrap());

    // Change into a new directory, relative to the one we are currently in.
    let _ = ftp_stream.cwd("test_data").unwrap();

    // Retrieve (GET) a file from the FTP server in the current working directory.
    let remote_file = ftp_stream.simple_retr("ftpext-charter.txt").unwrap();
    println!("Read file with contents\n{}\n", str::from_utf8(&remote_file.into_inner()).unwrap());

    // Store (PUT) a file from the client to the current working directory of the server.
    let mut reader = Cursor::new("Hello from the Rust \"ftp\" crate!".as_bytes());
    let _ = ftp_stream.put("greeting.txt", &mut reader);
    println!("Successfully wrote greeting.txt");

    // Terminate the connection to the server.
    let _ = ftp_stream.quit();
}

License

Licensed under either of

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:

docker build -t ftp-server tests

To start the FTP server that is tested against:

tests/ftp-server.sh

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:

cargo test

The following commands can be useful:

# List running containers of ftp-server image
# (to include stopped containers use -a option)
docker ps --filter ancestor=ftp-server

# To stop and remove a container
docker stop container_name
docker rm container_name

# To remove the image
docker rmi ftp-server
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].