stree 0.2.0

A directory hierarchy mapping format, similar to mtree
Documentation
#[cfg(feature = "magic")]
fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>>
{
    use stree::{Tree, *};
    if std::env::args().count() < 2
    {
        eprintln!("usage: magic <PATH>");
        std::process::exit(2);
    }
    let path = std::env::args().nth(1).expect("args.count() lied");

    let config = EntryConfig::new()
        .mime_type(true)
        .mime_encoding(true);
    let tree = Tree::new(&path, Some(&config))?;

    println!("{tree}");

    Ok(())
}

#[cfg(not(feature = "magic"))]
fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>>
{
    eprintln!("this example requires the 'magic' crate feature to be enabled");
    Ok(())
}