• 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
Re: How to empty the Trash programmatically?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to empty the Trash programmatically?


  • Subject: Re: How to empty the Trash programmatically?
  • From: Oleg Krupnov <email@hidden>
  • Date: Fri, 16 Apr 2010 19:07:12 +0300

> The only app that the user wants to empty the trash is Finder, not yours. If they want it emptied (or emptied securely), they'll go to the Finder and use the menu there. It's OK for your app to move stuff to the trash as long as it's clear to the user that will happen, but emptying it is not your business. The clue really is the fact that doing so is not supported directly by an API.

Graham, your point makes sense. I will think about it. In fact, I'm
now researching the possibility, not already implementing it.

> +1 to that.  Any application that emptied my Trash programmatically would find itself being the first new item in there.

Jeremy, LOL :)

> To be fair though, if it is a user-initiated emptying and it is done via Finder, then I think it is fine to initiate a Trash emptying from another app. What isn't fine is for it to be done behind the user's back.

Matt, you're right, that's nearly how it would be implemented.

> Every once in a while a question on cocoa-dev gives me the uncomfortable feeling that someone is trying to get help in writing a piece of malware. This is one of them. No offense if that’s not your actual goal, Oleg, but take it as a sign of how negatively people perceive this behavior.
>
> As others have said, if you give us more detail about what the actual purpose of this feature is, maybe we can suggest a better way to do it. Are you trying to make sure a particular file you created gets deleted securely? Emptying the trash isn’t the way to do it, then.
>

No, Jens, your feeling is wrong. I'm developing an app for disk space
management, particularly for freeing up disk space. Actually you can
take a look: http://www.daisydiskapp.com. The new version of the app I
am developing will allow deleting files, and (maybe) emptying the
trash as well. So, it would be just a user-initiated command, a
shortcut to what Finder does. I am actually surprised my question
could raise any suspicion. Why? That's amusing... :)
_______________________________________________

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>
References: 
 >How to empty the Trash programmatically? (From: Oleg Krupnov <email@hidden>)
 >Re: How to empty the Trash programmatically? (From: Jens Alfke <email@hidden>)
 >Re: How to empty the Trash programmatically? (From: Oleg Krupnov <email@hidden>)
 >Re: How to empty the Trash programmatically? (From: Dave Keck <email@hidden>)
 >Re: How to empty the Trash programmatically? (From: Oleg Krupnov <email@hidden>)
 >Re: How to empty the Trash programmatically? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: program termination after releasing self defined NSXMLParser class
  • Next by Date: Re: How to find all clipping siblings for a view?
  • Previous by thread: Re: How to empty the Trash programmatically?
  • Next by thread: Re: How to empty the Trash programmatically?
  • Index(es):
    • Date
    • Thread