I need to monitor the available free space on the disk using objective-c, especially when it changes. If this is not feasible then I am interested to detect when the trash is emptied by the user.
Thanks for your help,
Regards,
I need to monitor the available free space on the disk using objective-c, especially when it changes. If this is not feasible then I am interested to detect when the trash is emptied by the user.
Thanks for your help,
Regards,
There are about a zillion things at any given moment that might be writing to disk; VM, console logs, programs, caches, preferences, the user, etc...
... thus, receiving a notice of whenever free disk changes is pretty much useless because you would be receiving such a notice all the time.
Watching for the trash being emptied shouldn't be too hard; a kqueue could do it easily enough. But that isn't likely to tell you much, either; the trash might have 400MB in it or it might have 4K.
What are you really trying to do?