| tag | 328c7b42504678f5d010d12a92ecc6c720992994 | |
|---|---|---|
| tagger | Xuanwo <github@xuanwo.io> | Tue Mar 01 17:37:44 2022 +0800 |
| object | 07f8ff7365872a9f282984c9772700ae85975b23 |
Release v0.1.1
| commit | 07f8ff7365872a9f282984c9772700ae85975b23 | [log] [tgz] |
|---|---|---|
| author | Xuanwo <github@xuanwo.io> | Tue Mar 01 17:37:26 2022 +0800 |
| committer | GitHub <noreply@github.com> | Tue Mar 01 17:37:26 2022 +0800 |
| tree | b7decb4fc29a55ea00c5ec40270b38253040cce4 | |
| parent | 6511b9a448500c9fbfa8c162e36bd28d8d202c90 [diff] |
Bump to version 0.1.1 (#79) 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 anyhow::Result; use futures::AsyncReadExt; use opendal::services::fs; use opendal::Operator; #[tokio::main] async fn main() -> Result<()> { let op = Operator::new(fs::Backend::build().root("/tmp").finish().await?); let o = op.object("test_file"); // Write data info file; let w = o.writer(); let n = w .write_bytes("Hello, World!".to_string().into_bytes()) .await?; assert_eq!(n, 13); // Read data from file; let mut r = o.reader(); let mut buf = vec![]; let n = r.read_to_end(&mut buf).await?; assert_eq!(n, 13); assert_eq!(String::from_utf8_lossy(&buf), "Hello, World!"); // Get file's Metadata let meta = o.metadata().await?; assert_eq!(meta.content_length(), 13); // Delete file. o.delete().await?; Ok(()) }
Check out the CONTRIBUTING.md guide for more details on getting started with contributing to this project.
OpenDAL is licensed under Apache 2.0.