How to empty the Trash programmatically?
How to empty the Trash programmatically?
- Subject: How to empty the Trash programmatically?
- From: Oleg Krupnov <email@hidden>
- Date: Fri, 16 Apr 2010 09:05:10 +0300
Hi,
Is there a way to programmatically empty the Trash can?
I could delete all files from /Users/<account>/.Trash folder, but I am
not sure if it's a legitimate way. Also it will not include trashed
files from other volumes, stored in /.Trashes/<account id>. The latter
are generally not accessible even to list them without root
permissions, so there is no easy way to empty that part of the Trash.
Another related question would be how to measure the total size of all
files in the Trash (other than scanning), including the files on other
volumes.
Thanks!
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden