mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-07-21 14:08:51 -04:00
Merge commit 'fec26926a8
' as 'tokio-tar'
This commit is contained in:
commit
18ba8f49c4
34 changed files with 6427 additions and 0 deletions
16
tokio-tar/examples/write.rs
Normal file
16
tokio-tar/examples/write.rs
Normal file
|
@ -0,0 +1,16 @@
|
|||
extern crate tokio_tar as async_tar;
|
||||
|
||||
use async_tar::Builder;
|
||||
use tokio::fs::File;
|
||||
|
||||
fn main() {
|
||||
tokio::runtime::Runtime::new().unwrap().block_on(async {
|
||||
let file = File::create("foo.tar").await.unwrap();
|
||||
let mut a = Builder::new(file);
|
||||
|
||||
a.append_path("README.md").await.unwrap();
|
||||
a.append_file("lib.rs", &mut File::open("src/lib.rs").await.unwrap())
|
||||
.await
|
||||
.unwrap();
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue