This service can be used to:
root: Set the work dir for backend.You can refer to [FsBuilder]'s docs for more information
use std::sync::Arc; use anyhow::Result; use opendal::services::Fs; use opendal::Operator; #[tokio::main] async fn main() -> Result<()> { // Create fs backend builder. let mut builder = Fs::default() // Set the root for fs, all operations will happen under this root. // // NOTE: the root must be absolute path. .root("/tmp"); // `Accessor` provides the low level APIs, we will use `Operator` normally. let op: Operator = Operator::new(builder)?.finish(); Ok(()) }