Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS purgeable space #91

Open
fenhl opened this issue Oct 28, 2021 · 2 comments
Open

macOS purgeable space #91

fenhl opened this issue Oct 28, 2021 · 2 comments

Comments

@fenhl
Copy link
Contributor

fenhl commented Oct 28, 2021

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.

@valpackett
Copy link
Owner

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?

@fenhl
Copy link
Contributor Author

fenhl commented Oct 28, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants