treewalk 0.1.2

Common utilities for exploring a file tree
Documentation
treewalk-0.1.2 has been yanked.

treewalk v0.1.1

Common utilities for exploring a file tree

Example usage

    use std::path::{Path, PathBuf};
    use treewalk::walk::{comparison, lineage, format};

    fn main() {
        let path = Path::new("./foo/bar");

        let mut children: Vec<PathBuf> = lineage::get_all_children(&path.to_path_buf());

        let small = comparison::largest_file(children);
        if let Some(file_name) = &small.name {
            println!("{:?}: {:?}", file_name, format::human_readable(small.size));
        }

        for ancestor in path.ancestors() {
            println!("{}", ancestor.display());
        }
    }