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

Confusion over FSMoveObjectToTrashSync docs


  • Subject: Confusion over FSMoveObjectToTrashSync docs
  • From: Randall Meadows <email@hidden>
  • Date: Thu, 7 Aug 2008 13:03:20 -0600

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: Nate Weaver <email@hidden>
  • Prev by Date: Re: Core Data question
  • Next by Date: (no subject)
  • Previous by thread: Xcode and Cocoa docs and the Preview sidebar TOC
  • Next by thread: Re: Confusion over FSMoveObjectToTrashSync docs
  • Index(es):
    • Date
    • Thread