Expand description
§Store Module
The store module defines a Store struct, representing a storage unit
with associated methods for file operations.
§Example Usage
use std::path::PathBuf;
use active_storage::{drivers, StoreConfig};
#[tokio::main]
async fn main() {
let config = drivers::disk::Config {
location: PathBuf::from("tmp"),
};
let disk_driver = StoreConfig::Disk(config).build().await.unwrap();
let file_path = PathBuf::from("test.txt");
disk_driver
.write(file_path.as_path(), "my content")
.await
.unwrap();
}