Re: Confusion over FSMoveObjectToTrashSync docs
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