| tag | 75ff5c631eb87825f916c0b9e72eafabcd97a399 | |
|---|---|---|
| tagger | Xuanwo <github@xuanwo.io> | Thu Feb 24 19:09:56 2022 +0800 |
| object | dee9fc97e44c2c52f1611fd8411af9df8f1d1ef6 |
Release v0.1.0
| commit | dee9fc97e44c2c52f1611fd8411af9df8f1d1ef6 | [log] [tgz] |
|---|---|---|
| author | Xuanwo <github@xuanwo.io> | Thu Feb 24 19:09:17 2022 +0800 |
| committer | GitHub <noreply@github.com> | Thu Feb 24 19:09:17 2022 +0800 |
| tree | 2be06daaa997f772e5a4f88acb9ddd3144897f42 | |
| parent | bd2ba1805ea5275244d204b1bc7691dc1de5f0d1 [diff] |
Bump to version 0.1.0 (#61) 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.