• 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
recycleURLs with authorization
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

recycleURLs with authorization


  • Subject: recycleURLs with authorization
  • From: sqwarqDev <email@hidden>
  • Date: Thu, 18 Jun 2015 08:16:48 +0700

Hi list

I'm trying to move some files to the trash with my app, but I need OS X to throw an authentication dialog when the requested file needs permission to be moved.

I need a solution that will work from 10.6 onwards, so I've been looking at NSWorkspace's recycleURLs rather than NSFileManager's trashItemAtURL (not available pre 10.8).

My problem is that recycleURLs doesn't appear to offer an option to ask the user for a password if it's needed. Is there another method I can use that will, or a way to make recycleURLs throw the dialog? I know I could probably run an NSTask and call "rm" but that's a bit more brutal than what I'm looking for. I'd like the user to actually see the file in the Trash and to know that they've authorised its removal.


TIA


Phil
_______________________________________________

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: recycleURLs with authorization
      • From: Sean McBride <email@hidden>
  • Prev by Date: Re: Scary Stuff!
  • Next by Date: Re: recycleURLs with authorization
  • Previous by thread: [OT] We appeared in Product Hunt
  • Next by thread: Re: recycleURLs with authorization
  • Index(es):
    • Date
    • Thread