systemstat icon indicating copy to clipboard operation
systemstat copied to clipboard

macOS purgeable space

Open fenhl opened this issue 4 years ago • 2 comments

macOS has a concept of purgeable space. It can be treated like free space for most purposes, because the OS deletes from it if space gets too low. As such, it would make sense to either include it in Filesystem.avail or add it as a separate API.

fenhl avatar Oct 28 '21 05:10 fenhl

would make sense to either include it in Filesystem.avail

No, on all unix platforms the free/avail/total fields directly correspond to the struct statfs fields and it should stay like that (I'll add some documentation comments).

add it as a separate API

I guess that would be fine, though we haven't had any platform-specific functions yet…

What is the API to retrieve it, btw?

valpackett avatar Oct 28 '21 10:10 valpackett

Good question. The third-party app DaisyDisk can detect it so it's definitely possible, and the “About This Mac” dialog shows it as available immediately so it doesn't require traversing the file hierarchy, but I haven't been able to find any info about how, and DaisyDisk is closed-source.

fenhl avatar Oct 28 '21 22:10 fenhl