mirror of
git://git.proxmox.com/git/pxar.git
synced 2025-01-03 09:17:38 +03:00
a5b958d10c
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 lines
525 B
Rust
20 lines
525 B
Rust
use pxar::decoder::aio::Decoder;
|
|
|
|
#[tokio::main]
|
|
async fn main() {
|
|
let mut args = std::env::args_os().skip(1);
|
|
|
|
let file = args.next().expect("expected a file name");
|
|
let file = tokio::fs::File::open(file)
|
|
.await
|
|
.expect("failed to open file");
|
|
|
|
let mut reader = Decoder::from_tokio(file)
|
|
.await
|
|
.expect("failed to open pxar archive contents");
|
|
|
|
while let Some(entry) = reader.next().await {
|
|
println!("{:#?}", entry.expect("failed to parse entry").path());
|
|
}
|
|
}
|