Importance of 'keys' and other options when creating bookmarks with NSURL?
Importance of 'keys' and other options when creating bookmarks with NSURL?
- Subject: Importance of 'keys' and other options when creating bookmarks with NSURL?
- From: Sean McBride <email@hidden>
- Date: Mon, 22 Oct 2012 16:23:19 -0400
- Organization: Rogue Research Inc.
Hi all,
I have recently been replacing all my Alias Manager use with NSURL & bookmarks.
One thing that has surprised and confused me is the 'keys' parameter to bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:.
The docs say only "An array of names of URL resource properties".
It seems that if you provide nil and are later unable to resolve the bookmark, you can't find out *anything* about it, not even its original name or path. With an AliasRecord, you are always able to get basic info like that back. I found one related item in the archives:
<http://lists.apple.com/archives/cocoa-dev/2012/Feb/msg00165.html>
Is it others' experience as well that it is vital to always at least provide a few basic keys like NSURLNameKey and NSURLParentDirectoryURLKey?
And how about NSURLBookmarkCreationOptions? There's NSURLBookmarkCreationMinimalBookmark and NSURLBookmarkCreationSuitableForBookmarkFile. Are they mutually exclusive? How minimal is minimal, and does my key choice impact the definition of 'minimal'? If I provide neither, do I get a superset of minimal or...? It seems the docs are vague here.
Thanks,
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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