How ahmedkhaleel2004/blitztree works
BlitzTree is a native macOS disk-usage visualizer: the user chooses a folder or volume, the Rust engine scans and aggregates its contents, and the Swift app presents the result as a treemap and outline table. The README documents live progress, free-space display, cushion shading, and directory title strips; the sampled UI also supports selection and file actions. The scan crosses the C FFI as flat arrays read by Swift. The README describes the scan strategy; unsampled implementation details are not inferred here.
Main entry points: ContentView.swift Scan screen · Model.swift Scan model · ffi.rs C FFI · TreemapView.swift Treemap canvas
Components 15
macOS app
- App entry
app/Main.swift - Scan screen
app/ContentView.swift - Scan model
app/Model.swift - Tree model
app/Model.swift - Progress stats
app/ContentView.swift
Rust scan engine
- C FFI
src/ffi.rs - Directory scan
src/lib.rs
Tree views
- Treemap layout
app/Treemap.swift - Treemap canvas
app/TreemapView.swift - Outline table
app/ContentView.swift - File actions
app/TreemapView.swift
macOS services
- Filesystem
- Finder
- Volume stats
Other components
- User
Connections 23
- User → Scan screen: chooses target
- App entry → Scan screen: shows
- Scan screen → Scan model: starts scan
- Scan model → C FFI: starts scan
- C FFI → Directory scan: runs scan
- Directory scan → Filesystem: reads entries
- Directory scan → C FFI: returns tree
- Scan model → C FFI: polls progress
- C FFI → Scan model: returns counters
- C FFI → Tree model: exposes arrays
- Scan model → Tree model: creates tree
- Scan model → Volume stats: reads capacity
- Scan screen → Progress stats: shows progress
- Scan screen → Treemap canvas: shows map
- Tree model → Treemap layout: supplies tree
- Treemap canvas → Treemap layout: lays out nodes
- Treemap canvas → Tree model: reads tree
- Scan screen → Outline table: shows outline
- Outline table → Tree model: reads tree
- User → Treemap canvas: selects item
- Treemap canvas → File actions: dispatches actions
- File actions → Finder: reveals or trashes
- Volume stats → Scan screen: provides free space