• 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: Confusion over FSMoveObjectToTrashSync docs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Confusion over FSMoveObjectToTrashSync docs


  • Subject: Re: Confusion over FSMoveObjectToTrashSync docs
  • From: Nate Weaver <email@hidden>
  • Date: Thu, 7 Aug 2008 15:12:37 -0500

I'd say just try the default options and see what happens. You might also look at -[NSWorkspace performFileOperation:source:destination:files:tag:] with NSWorkspaceRecycleOperation as the first argument.

On Aug 7, 2008, at 2:03 PM, Randall Meadows wrote:

The description for FSMoveObjectToTrashSync says: "This function moves a file or directory to the Trash, adjusting the object’s name if necessary." (Meaning, I suppose, it appends a number to the filename to make it unique in the Trash directory.)

Lovely, *exactly* what I need to do.  Happy happy, joy joy!

However, when I get into actually writing the code, I get to the "options" argument, which are described as:

"kFSFileOperationDefaultOptions
Use the following default options:

•If the destination directory contains an object with the same name as a source object, abort the operation.

kFSFileOperationOverwrite
If the destination directory contains an object with the same name as a source object, overwrite the destination object."



Um, what happened to that part about "adjusting the object’s name if necessary"? According to the options flags, that is not possible; it's either abort the operation or overwrite.


Anyone know the skinny on this actually works? The way I want to use this function is to move a file that resides in a document bundle into the Trash directory that resides on the same volume as the document bundle (and yes, I understand that not all volumes support Trash folders, I can handle that).

Thanks!
randy_______________________________________________
_______________________________________________

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: Confusion over FSMoveObjectToTrashSync docs
      • From: Mark Allan <email@hidden>
    • Re: Confusion over FSMoveObjectToTrashSync docs
      • From: Randall Meadows <email@hidden>
References: 
 >Confusion over FSMoveObjectToTrashSync docs (From: Randall Meadows <email@hidden>)

  • Prev by Date: Re: packed NSTextfield and NSFormatter in IB3 plugin...
  • Next by Date: Re: How do I get those 1 pixel black lines into my app window?
  • Previous by thread: Confusion over FSMoveObjectToTrashSync docs
  • Next by thread: Re: Confusion over FSMoveObjectToTrashSync docs
  • Index(es):
    • Date
    • Thread