stree 0.2.0

A directory hierarchy mapping format, similar to mtree
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use stree::*;

fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>>
{
    if std::env::args().count() < 2
    {
        eprintln!("usage: pkg <PATH>");
        std::process::exit(2);
    }
    let path = std::env::args().nth(1).expect("args.count() lied if this fails");
    let config = EntryConfig::new()
        .checksum(Hash::Crc32c)
        .nlink(true)
        .birth_time(true)
        .link_target(true);
    println!("{}", Tree::new(&path, Some(&config))?);
    Ok(())
}