Skip to main content

Module scan

Module scan 

Source
Expand description

Filesystem walk: enumerate seeds → ranked Cache entries.

Functions§

collect
Walk every seed and concatenate, de-duplicating by canonicalised absolute path. Order is preserved (first occurrence wins).
collect_with_progress
Same as collect but invokes on_dir once per directory entry observed during every cache’s walk. The startup-scan worker uses this to send Msg::ScanProgress updates to the TUI.
enumerate_seed
Enumerate immediate children of seed; each becomes one Cache. Non-existent or non-directory seeds yield an empty vec.
enumerate_seed_with_progress
Same as enumerate_seed but invokes on_dir once per directory entry observed during each child cache’s walk. Drill-in workers use this to feed Msg::ScanProgress to the TUI so the spinner counts folders the same way the startup scan does.
stat_dir
Walk a single directory and aggregate its size, newest mtime, and counts. Symlinks are not followed. Permission errors are silenced.
stat_dir_with_progress
Same as stat_dir but invokes on_dir once per directory entry observed during the walk. The callback is the per-cache progress hook used by the startup scan to feed Msg::ScanProgress to the TUI.