• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to empty the Trash programmatically?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: How to empty the Trash programmatically?
      • From: Jens Alfke <email@hidden>
    • Re: How to empty the Trash programmatically?
      • From: Charles Srstka <email@hidden>
    • Re: How to empty the Trash programmatically?
      • From: "Stephen J. Butler" <email@hidden>
    • Re: How to empty the Trash programmatically?
      • From: Dave Carrigan <email@hidden>
  • Prev by Date: Re: Setting front window when launched from another application
  • Next by Date: Re: How to empty the Trash programmatically?
  • Previous by thread: Re: Does XCode 3.2 Documentation Browser Stink?
  • Next by thread: Re: How to empty the Trash programmatically?
  • Index(es):
    • Date
    • Thread