Crates.io | async-tar |
lib.rs | async-tar |
version | 0.5.0 |
source | src |
created_at | 2019-12-24 23:19:06.951127 |
updated_at | 2024-09-02 17:43:41.343883 |
description | A Rust implementation of an async TAR file reader and writer. This library does not currently handle compression, but it is abstract over all I/O readers and writers. Additionally, great lengths are taken to ensure that the entire contents are never required to be entirely resident in memory all at once. |
homepage | https://github.com/dignifiedquire/async-tar |
repository | https://github.com/dignifiedquire/async-tar |
max_upload_size | |
id | 192216 |
size | 250,457 |
Based on the great tar-rs.
use async_std::io::stdin;
use async_std::prelude::*;
use async_tar::Archive;
fn main() {
async_std::task::block_on(async {
let mut ar = Archive::new(stdin());
let mut entries = ar.entries().unwrap();
while let Some(file) = entries.next().await {
let f = file.unwrap();
println!("{}", f.path().unwrap().display());
}
});
}
use async_std::fs::File;
use async_tar::Builder;
fn main() {
async_std::task::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();
});
}
Minimal stable rust version: 1.63
An increase to the MSRV is accompanied by a minor version bump
This project is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.