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.3"
remotefs-ftp = "^0.2"
these features are supported:
find
: enablefind()
method for RemoteFs. (enabled by default)secure
: enable FTPSno-log
: disable logging. By default, this library will log via thelog
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());
Re-exports§
pub use client::FtpFs;
Modules§
- Ftp