]> git.proxmox.com Git - pxar.git/blame - examples/apxar.rs
bump version to 0.10.2-1
[pxar.git] / examples / apxar.rs
CommitLineData
6cd4f635
WB
1use pxar::decoder::aio::Decoder;
2
3#[tokio::main]
4async fn main() {
5 let mut args = std::env::args_os().skip(1);
6
7 let file = args.next().expect("expected a file name");
8 let file = tokio::fs::File::open(file)
9 .await
10 .expect("failed to open file");
11
12 let mut reader = Decoder::from_tokio(file)
13 .await
14 .expect("failed to open pxar archive contents");
6cd4f635 15
a5b958d1 16 while let Some(entry) = reader.next().await {
6cd4f635
WB
17 println!("{:#?}", entry.expect("failed to parse entry").path());
18 }
19}