Re: How to empty the Trash programmatically?
Re: How to empty the Trash programmatically?
- Subject: Re: How to empty the Trash programmatically?
- From: Jens Alfke <email@hidden>
- Date: Fri, 16 Apr 2010 11:03:55 -0700
On Apr 16, 2010, at 10:43 AM, Paul Sanders wrote:
rm -rf ~/.Trash/*
For volumes other than the startup volume it is a little more
complicated:
rm -rf /Volumes/volume_name/.Trashes/uid/*
Please don't hardcode those paths. Use system APIs like FindFolder
instead to locate the trash directory for a given volume. Or better
yet, ask the Finder to do it, so the user gets progress information
and feedback about errors.
—Jens_______________________________________________
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