• 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: Moving file to trash on afp volume
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving file to trash on afp volume


  • Subject: Re: Moving file to trash on afp volume
  • From: Peter Ammon <email@hidden>
  • Date: Thu, 2 Oct 2008 12:19:55 -0700

On Oct 2, 2008, at 8:41 AM, Laurent Cerveau wrote:

Hi

I'd like to programmatically mov to trash a file from an afp mounted volume. I have been using NSWorkspace with NSWorkspaceRecycleOperation but it fails (tag returned is -1).
Is there a way to get a more exact description of the error?


I tried to move to FSPathMoveObjectToTrashSync and it returns an error -120 (directory not found). I look on the mounted volume and .Trash seems not to be here. By itself not a real problem but is there a way to trigger NSWorkspace or the FileManager to display a dialog like in Finder saying "the file will be deleted immediately and other thing"

No, the frameworks don't have this feature. You might consider using scripting to ask the Finder to move the file to the trash.


-Peter

_______________________________________________

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


References: 
 >Moving file to trash on afp volume (From: Laurent Cerveau <email@hidden>)

  • Prev by Date: Re: Threads + Garbage Collection = Crash?
  • Next by Date: Re: WebView security level?
  • Previous by thread: Moving file to trash on afp volume
  • Next by thread: Moving file to trash on afp volume
  • Index(es):
    • Date
    • Thread