| commit | 2efe962fb0ac8e74f0a631ab9dc5d73e757b7822 | [log] [tgz] |
|---|---|---|
| author | Xuanwo <github@xuanwo.io> | Wed Feb 16 16:06:13 2022 +0800 |
| committer | GitHub <noreply@github.com> | Wed Feb 16 16:06:13 2022 +0800 |
| tree | 64a41665bab88d1ab1075443d195be0c175fe2b4 | |
| parent | 80310c0446a6fd640abaf102590585b3556590fe [diff] |
benches: Implement benches for ops (#26) Signed-off-by: Xuanwo <github@xuanwo.io>
Open Data Access Layer that connect the whole world together.
OpenDAL is in alpha stage and has been early adopted by databend. Welcome any feedback at Discussions!
use opendal::Operator; use opendal::services::fs; use anyhow::Result; #[tokio::main] async fn main() -> Result<()>{ let mut op = Operator::new(fs::Backend::build().finish().await?); // Write data into file. let n = op.write("/path/to/file.txt", 1024).run(buf).await?; // Read data from file. let mut r = op.read("/path/to/file.txt").run().await?; r.read_to_end(&mut buf).await?; // Get file metadata. let o = op.stat("/path/to/file.txt").run().await?; // Delete file. op.delete("/path/to/file.txt").run().await?; }
OpenDAL is licensed under Apache 2.0.