Crate remotefs_ftp

source ·
Expand description

remotefs-ftp

remotefs-ftp is a client implementation for remotefs, providing support for the FTP/FTPS protocols.

Get started

First of all you need to add remotefs and the client to your project dependencies:

remotefs = "^0.2.0"
remotefs-ftp = "^0.1.3"

these features are supported:

  • find: enable find() method for RemoteFs. (enabled by default)
  • secure: enable FTPS
  • no-log: disable logging. By default, this library will log via the log crate.

FTP client

use remotefs::RemoteFs;
use remotefs::client::ftp::FtpFs;
use std::path::Path;

let mut client = FtpFs::new("127.0.0.1", 21)
    .username("test")
    .password("password");
// connect
assert!(client.connect().is_ok());
// get working directory
println!("Wrkdir: {}", client.pwd().ok().unwrap().display());
// change working directory
assert!(client.change_dir(Path::new("/tmp")).is_ok());
// disconnect
assert!(client.disconnect().is_ok());
Run

Re-exports

Modules