How bootandy/dust works
Main Components
a. Core Components:
• CLI Interface (src/cli.rs)
• Directory Walker (src/dir_walker.rs)
• System (src/display.rs, src/display_node.rs)
• Node Management (src/node.rs)
• Configuration Handler (src/config.rs)
• Filtering System (src/filter.rs, src/filter_type.rs)
b. Supporting Components:
• Platform-specific Operations (src/platform.rs)
• Progress Tracking (src/progress.rs)
• Utility Functions (src/utils.rs)
┌─────────────────────────────────────────────┐
• CLI Interface │
• ┬─────────────┬──────────────┘
┌───────────────▼─┐ ┌─────▼────────┐
• Config Handler │ │ Dir Walker │
• ┬─┘ └──────┬───────┘
┌───────────────▼─────────────▼───────┐
• Node Management │
• ┬───────────────────┬─┘
┌───────────────▼─┐ ┌──────▼──────┐
• Filtering System│ │Display System│
• ┘ └─────────────┘
Important Relationships
a. Data Flow:
• CLI Interface → Config Handler (configuration parsing)
• CLI Interface → Dir Walker (initiating directory scanning)
• Dir Walker → Node Management (creating directory tree)
• Node Management → Filtering System (applying filters)
• Node Management → Display System (rendering output)
b. Cross-cutting Concerns:
• Progress Tracking (affects multiple components)
• Platform-specific operations (used by multiple components)
Additional Elements
Raw File System → Directory Tree → Filtered Tree → Formatted Output
Implementation Details to Highlight
• Configuration file locations (~/.config/dust/config.toml, ~/.dust.toml)
• Support for different output formats (ASCII, JSON)
• Filter types (size-based, regex, file type)