mirror of
https://github.com/tobi/disktree.git
synced 2026-11-29 08:00:52 +00:00
disktree built and drew on macOS already, through GPUI's Metal backend, but the Linux plumbing underneath did not carry over. This makes it work well there, without unsafe code, and tightens removal safety for every platform on the way. Trash and removal - On macOS always the system Trash, through NSFileManager (the trash crate): the same move as Finder's, into the item's own disk's Trash. gio/trash-put/XDG would put files in ~/.local/share/Trash, which Finder never shows. - Refuse a directory holding the home directory (/Users is on the same volume as / on macOS) or a system tree (/opt holds /opt/homebrew); add /System, /Library, /private, /opt/homebrew, /cores, /Network. - Refuse a directory with a mount inside it; on macOS the mount list comes from /sbin/mount, read on a background thread. - Permanent deletion walks the tree itself and stops at a mount boundary, like rm -rf --one-file-system (the walker is from #10). - Guards see through /System/Volumes/Data spellings and, on macOS, case. Scanning - Skip /System/Volumes/Data when scanning /: it is /Users, /Applications and the rest again under firmlinks, so / was counted twice. - Whole disk (g, --disk) works: the disk root and device come from statfs. - Never list cloud-only (dataless) iCloud/File Provider folders, which would download them. - Keep a file's identity only when it has more than one name. App - Explain unreadable items when Full Disk Access is missing, with a button to the privacy settings. - A menu bar: Open Folder… (⌘O), Show in Finder (o, ⌘⇧R), Rescan (⌘R), Hide, Quit; closing the window quits; other ⌘ chords are not read as plain letters; help shows ⌘. - Follow the system light/dark appearance when no Omarchy theme exists. - Worth a look knows Xcode DerivedData, DeviceSupport and ~/Library/Logs. - git: skipped without the developer tools (its stub opens a dialog), and never runs a checkout's programs: fsmonitor, hooks and pager off, and no status for a checkout that defines its own filter drivers. Packaging - cargo xtask bundle builds disktree.app and a zip: Info.plist (bundle id io.github.tobi.disktree, macOS 11+), an icon drawn from an SVG on the macOS grid, ad-hoc or Developer ID signing, and --notarize. - make install on macOS puts the app in ~/Applications and links ~/.local/bin/disktree to it. - CI lints, tests and bundles on macOS; the release adds an arm64 macOS zip, signed and notarized when the repository has the Apple secrets.
49 lines
2.2 KiB
XML
49 lines
2.2 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<!-- Rendered by `cargo xtask bundle`, which fills in @VERSION@.
|
|
The bundle identifier is what macOS keys Full Disk Access and folder
|
|
permissions to: changing it makes every user grant them again. -->
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>CFBundleIdentifier</key>
|
|
<string>io.github.tobi.disktree</string>
|
|
<key>CFBundleName</key>
|
|
<string>disktree</string>
|
|
<key>CFBundleDisplayName</key>
|
|
<string>disktree</string>
|
|
<key>CFBundleExecutable</key>
|
|
<string>disktree</string>
|
|
<key>CFBundleIconFile</key>
|
|
<string>AppIcon</string>
|
|
<key>CFBundlePackageType</key>
|
|
<string>APPL</string>
|
|
<key>CFBundleInfoDictionaryVersion</key>
|
|
<string>6.0</string>
|
|
<key>CFBundleShortVersionString</key>
|
|
<string>@VERSION@</string>
|
|
<key>CFBundleVersion</key>
|
|
<string>@VERSION@</string>
|
|
<key>LSMinimumSystemVersion</key>
|
|
<string>11.0</string>
|
|
<key>LSApplicationCategoryType</key>
|
|
<string>public.app-category.utilities</string>
|
|
<key>NSHighResolutionCapable</key>
|
|
<true/>
|
|
<key>NSHumanReadableCopyright</key>
|
|
<string>MIT License</string>
|
|
<!-- Shown in the prompts macOS raises the first time a scan reaches
|
|
each of these. Full Disk Access has no prompt and no string: it is
|
|
granted in System Settings, which the app links to. -->
|
|
<key>NSDesktopFolderUsageDescription</key>
|
|
<string>disktree measures the Desktop folder to show what is using your disk. It reads sizes and names only.</string>
|
|
<key>NSDocumentsFolderUsageDescription</key>
|
|
<string>disktree measures the Documents folder to show what is using your disk. It reads sizes and names only.</string>
|
|
<key>NSDownloadsFolderUsageDescription</key>
|
|
<string>disktree measures the Downloads folder to show what is using your disk. It reads sizes and names only.</string>
|
|
<key>NSRemovableVolumesUsageDescription</key>
|
|
<string>disktree measures removable disks you scan to show what is using them. It reads sizes and names only.</string>
|
|
<key>NSNetworkVolumesUsageDescription</key>
|
|
<string>disktree measures network disks you scan to show what is using them. It reads sizes and names only.</string>
|
|
</dict>
|
|
</plist>
|