remotefs/
lib.rs

1#![crate_name = "remotefs"]
2#![crate_type = "lib"]
3
4//! # remotefs
5//!
6//! remotefs is a library that provides a file system structure to work with all the most used file transfer protocols.
7//! This is achieved through a trait called `RemoteFs` which exposes methods to operate on the remote file system.
8//! Currently the library exposes a client for **Sftp**, **Scp**, **Ftp** and **Aws-s3**.
9//!
10//! ## Why remotefs
11//!
12//! You might be wondering what's the reasons behind remotefs.
13//! The first reason is to provide an easy way to operate with multiple protocols at the same time.
14//! For example, in [termscp](https://github.com/veeso/termscp), this came very handily to me.
15//! The second reason is that often, users need to implement just a simple client to operate on a remote file system, and they have to waste a lot of time in understanding how the protocol works just to achieve a single task.
16//!
17//! With remotefs this is no more a problem: all you need is to configure the options to connect to the remote host and you're ready to deal with the remote file system, as it were mounted on your pc.
18//!
19//! ## Get started
20//!
21//! First of all you need to add **remotefs** to your project dependencies:
22//!
23//! ```toml
24//! remotefs = "^0.3.0"
25//! ```
26//!
27//! these features are supported:
28//!
29//! - `no-log`: disable logging. By default, this library will log via the `log` crate.
30
31#![doc(html_playground_url = "https://play.rust-lang.org")]
32#![doc(
33    html_favicon_url = "https://raw.githubusercontent.com/remotefs-rs/remotefs-rs/main/assets/logo-128.png"
34)]
35#![doc(
36    html_logo_url = "https://raw.githubusercontent.com/remotefs-rs/remotefs-rs/main/assets/logo.png"
37)]
38
39// -- crates
40#[macro_use]
41extern crate log;
42
43// -- export
44pub use fs::{File, RemoteError, RemoteErrorType, RemoteFs, RemoteResult};
45// -- modules
46pub mod fs;
47
48// -- utils
49pub(crate) mod utils;
50// -- mock
51#[cfg(test)]
52pub(crate) mod mock;