treestat 1.1.0

A CLI that displays source file counts in a tree view by directory and language
Documentation
use std::collections::{BTreeSet, HashMap};
use std::path::PathBuf;

#[derive(Debug, Default)]
pub struct DirData {
    pub name: String,
    pub children: BTreeSet<PathBuf>,
    pub direct_files: usize,
}

/// Per-language file counts. Keys are canonical language names (lowercase, e.g. "rust", "c++").
#[derive(Debug, Default, Clone)]
pub struct LanguageCounts(pub HashMap<String, usize>);

#[derive(Debug)]
pub struct ScanResult {
    pub root: PathBuf,
    pub dirs: HashMap<PathBuf, DirData>,
    pub total_files: usize,
    pub dirs_with_files: usize,
    /// File count per canonical language name (only languages that had at least one matching file).
    pub language_counts: LanguageCounts,
}