Expand description
§remotefs-aws-s3
remotefs-aws-s3 is a client implementation for remotefs, providing support for the Aws S3 protocol.
§Get started
First of all you need to add remotefs and the client to your project dependencies:
remotefs = "^0.3.0"
remotefs-aws-s3 = "^0.3.0"
these features are supported:
find
: enablefind()
method for RemoteFs. (enabled by default)no-log
: disable logging. By default, this library will log via thelog
crate.
§Aws s3 client
ⓘ
use remotefs::RemoteFs;
use remotefs_aws_s3::AwsS3Fs;
use std::path::Path;
let mut client = AwsS3Fs::new("test-bucket")
.region("eu-west-1")
.profile("default")
.access_key("AKIAxxxxxxxxxxxx")
.secret_access_key("****************");
// 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());
§MinIO client
ⓘ
use remotefs::RemoteFs;
use remotefs_aws_s3::AwsS3Fs;
use std::path::Path;
let mut client = AwsS3Fs::new("test-bucket")
.endpoint("http://localhost:9000")
.new_path_style(true) // required for MinIO
.access_key("minioadmin")
.secret_access_key("minioadmin");
// 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::AwsS3Fs;
Modules§
- Aws s3