Crates.io | remotefs |
lib.rs | remotefs |
version | 0.3.1 |
source | src |
created_at | 2021-10-06 07:03:37.167253 |
updated_at | 2024-10-22 10:05:13.636141 |
description | a client library to work with all file transfer protocols |
homepage | |
repository | https://github.com/remotefs-rs/remotefs-rs |
max_upload_size | |
id | 461019 |
size | 62,245 |
Changelog · Get started · Documentation
~ The Omni Filetransfer Client Library (and more!) ~
Developed by @veeso
Current version: 0.3.1 (22/10/2024)
remotefs is a library that provides a file system structure to work with all the most popular file transfer protocols.
This is achieved through a trait called RemoteFs
which exposes methods to operate on the remote file system.
Currently the library exposes a client for Sftp, Scp, Kube, Ftp, WebDAV and Aws-s3 as external libraries.
You might be wondering, "why remotefs?" The first and foremost reason is to provide a generic interface over multiple protocols. For example, in termscp it allows the support of multiple protocols without any protocol-specific code. The second reason is that often, users just want a simple way to operate on a remote file system, however, they don't have the time to spend researching the ins and outs of each protocol.
Using remotefs, this is no longer a problem: all you need is to configure the options to your liking, then you're ready to connect.
First, add remotefs
to your list of dependencies:
remotefs = "^0.3.0"
select over a variety of features:
find
: enable the find()
method on RemoteFs
trait (enabled by default)no-log
: disable logging. By default, the log
crate is used.To use an existing client, you must add them to your Cargo.toml
, along with remotefs:
remotefs-aws-s3 = "^0.3.0"
remotefs-ftp = { version = "^0.3.0", features = [ "secure" ] }
remotefs-kube = "^0.3.0"
remotefs-smb = "^0.3.0"
remotefs-ssh = "^0.4.0"
remotefs-webdav = "^0.2.0"
As mentioned earlier, this library exposes a trait called RemoteFs
.
This trait exposes several methods to operate on a remote file system via the chosen client.
Let's briefly go over which methods are available:
The following table states the compatibility for each client associated with the remote file system trait method.
Note: connect()
, disconnect()
and is_connected()
MUST always be supported, and are so omitted in the table.
Client/Method | Aws-S3 | Ftp | Kube | Scp | Sftp | Smb | WebDAV |
---|---|---|---|---|---|---|---|
append_file | No | Yes | No | No | Yes | Yes | No |
append | No | Yes | No | No | Yes | No | No |
change_dir | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
copy | No | No | Yes | Yes | Yes | No | No |
create_dir | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
create_file | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
create | No | Yes | No | Yes | Yes | No | No |
exec | No | No | Yes | Yes | Yes | No | No |
exists | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
list_dir | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
mov | No | Yes | Yes | Yes | Yes | Yes | Yes |
open_file | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
open | No | Yes | No | Yes | Yes | No | No |
pwd | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
remove_dir_all | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
remove_dir | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
remove_file | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
setstat | No | No | Yes | Yes | Yes | No | No |
stat | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
symlink | No | No | Yes | Yes | Yes | Yes | No |
If you like remotefs and you're grateful for the work I've done, please consider a little donation 🥳
You can make a donation on the following platforms:
Contributions, bug reports, new features, and questions are welcome! 😉 If you have any questions or concerns, or you want to suggest a new feature, or you want just want to improve remotefs, feel free to open an issue or leave a pull request.
Please follow our contributing guidelines
View remotefs` changelog HERE
remotefs is licensed under the MIT license.
You can read the entire license HERE