Crate unftp_sbe_fs[][src]

Expand description

A libunftp StorageBackend that uses a local filesystem, like a traditional FTP server.

Here is an example for using this storage backend

use unftp_sbe_fs::ServerExt;

#[tokio::main]
pub async fn main() {
    let ftp_home = std::env::temp_dir();
    let server = libunftp::Server::with_fs(ftp_home)
        .greeting("Welcome to my FTP server")
        .passive_ports(50000..65535);

    server.listen("127.0.0.1:2121").await;
}

Structs

The Filesystem struct is an implementation of the StorageBackend trait that keeps its files inside a specific root directory on local disk.

Traits

Extension trait purely for construction convenience.