• 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: "Ken Ferry" <email@hidden>
  • Date: Thu, 7 Aug 2008 13:43:30 -0700

Part of the confusion may be the 'destination' parameter that
-[NSWorkspace performFileOperation:source:destination:files:tag:]
takes?

The recycle operation doesn't use the destination parameter.  It
calculates the correct trash directory for you.  The docs note that
not all operations use the destination, but it could probably be
clearer.

"Some operations—such as moving, copying, and linking files—require a
destination directory to be specified. If not, destination should be
the empty string (@"")."

-Ken

On Thu, Aug 7, 2008 at 1:36 PM, Nate Weaver <email@hidden> wrote:
> From the docs:
>
> "NSWorkspaceRecycleOperation
> Move file to trash. The file is moved to the trash folder on the volume
> containing the file[...]"
>
> So it's definitely a bug in NSWorkspace if it doesn't work this way.
>
> On Aug 7, 2008, at 3:23 PM, Ken Ferry wrote:
>
>> On Thu, Aug 7, 2008 at 1:19 PM, Randall Meadows <email@hidden>
>> wrote:
>>>
>>> On Aug 7, 2008, at 2:12 PM, Nate Weaver wrote:
>>>
>>>> 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.
>>>
>>> Yes, that's actually what I started with, but that doesn't
>>> (automatically)
>>> take into account the volume that the document resides on and its related
>>> Trash directory.  Which is what I'm hoping FSMoveObjectToTrash gives me.
>>
>> If something about NSWorkspace's behavior doesn't match the Finder,
>> please file a bug.
>>
>> Ken Ferry
>> Cocoa Frameworks
>>
>
> _______________________________________________
>
> 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
>
_______________________________________________

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: 
 >Confusion over FSMoveObjectToTrashSync docs (From: Randall Meadows <email@hidden>)
 >Re: Confusion over FSMoveObjectToTrashSync docs (From: Nate Weaver <email@hidden>)
 >Re: Confusion over FSMoveObjectToTrashSync docs (From: Randall Meadows <email@hidden>)
 >Re: Confusion over FSMoveObjectToTrashSync docs (From: "Ken Ferry" <email@hidden>)
 >Re: Confusion over FSMoveObjectToTrashSync docs (From: Nate Weaver <email@hidden>)

  • Prev by Date: Re: Confusion over FSMoveObjectToTrashSync docs
  • Next by Date: Re: Confusion over FSMoveObjectToTrashSync docs
  • Previous by thread: Re: Confusion over FSMoveObjectToTrashSync docs
  • Next by thread: Re: Confusion over FSMoveObjectToTrashSync docs
  • Index(es):
    • Date
    • Thread