Repository navigation
Conversation
Retain early mount-boundary filtering and Data-specific device fallback. Exercise the Data exception with an explicit mount boundary in the existing allocation and alias regression. Validation: cargo xtask ci passed with a workspace-local TMPDIR, avoiding upstream tests assumptions about raw versus canonical macOS temporary paths and protected /private paths.
Validate SSH roots in the Unix server namespace and preserve local path canonicalization in the picker assertion. Compile shell-based remote test helpers only on Unix. Validation: cargo xtask ci; cargo clippy -p disktree-core --all-targets --target x86_64-pc-windows-msvc -- -D warnings.
Keep hardlink accounting assertions on every platform, but expect live-tree previews only from the Unix streaming walker. The Windows fallback sends postorder records without preview controls. Validation: cargo xtask ci; cargo clippy -p disktree-core --all-targets --target x86_64-pc-windows-msvc -- -D warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for disktree. I'm using it to investigate disk usage on my Mac, where a read-only administrator scan found a 49.4 GiB Spotlight index.
Whole-disk scans skip
/System/Volumes/Datato avoid counting firmlinked files twice. This also excludes the Data volume's private.fseventsdhistory and.Spotlight-V100index. Neither store has a named category, and some entry collection failures leave directory totals without an incomplete flag.This change enters that second Data mount only for these two stores, keeping firmlinked user files excluded. Their sizes come from the existing tree and its allocated-byte and hardlink accounting, and are already included in the scan total. It adds distinct categories and a macOS service-store section that keeps protected stores visible even when no measurable treemap tile exists. Failed or filtered collection displays Unavailable or Incomplete; collection failures also propagate to ancestor totals.
The panel and README explain Full Disk Access, filesystem permissions, administrator-discretionary use of Apple's root-only FSEvents purge API, and Spotlight indexing choices. Full Disk Access does not override Unix ownership. The removal guard refuses direct deletion of either store or its descendants, and internal folders such as
Cacheinherit the service category without a reclaimable hatch. This feature does not purge history, change indexing, request elevation, or install a privileged helper.The development PR and detailed collection record are in huntharo/disktree#6.
Actual startup-drive evidence
After granting Terminal Full Disk Access, I ran an authenticated read-only
du -skscan:/System/Volumes/Data/.fseventsd/System/Volumes/Data/.Spotlight-V100The built PR application displays the real Spotlight index as 49 GiB, with 2.1 million files, 2,903 directories, the Spotlight index category, and indexing guidance. Its display rounds the size; separate scans of a live index do not establish equality of exact byte counts.
mdutil -s /System/Volumes/Datareports indexing enabled.Before and after
These unmodified native window captures use the same controlled files, allocated-size mode, and window size. Before is base
6c8d4ce; after is head2ff04ff. The direct-folder comparisons establish classification and access guidance; the Data-volume traversal regression separately verifies inclusion without duplicate aliases.A readable 128 MiB Spotlight fixture is classified as Other before and Spotlight index with indexing guidance after. Both scans measure the same 128 MiB.
A denied FSEvents fixture contains 64 MiB behind Unix permissions. Before, the selection displays 0 B despite its unreadable indicator. After, it displays Unavailable with the category and access guidance. Neither unprivileged scan can measure the hidden contents.
Validation
cargo xtask cion macOS at2ff04ffgit diff --checkRegression coverage includes allocated sizes, hardlinks, restricted Data traversal, permission failures and ancestor completeness, categories, deletion guards, and the real window harness for unavailable/partial figures and blocked removal. APFS clones and snapshots still mean measured file allocation is not guaranteed recoverable space; the guidance states that limitation.
Actual-drive size command and output
Before the Terminal access grant, the Spotlight command returned
Operation not permitted, including withsudo. The unprivileged app captures and that initial failure are preserved in the linked development PR. No service-store files, Unix permissions, indexing settings, or purge history were changed.