On 22 Oct 2012, at 21:23, Sean McBride <s...@rogue-research.com> wrote:
> 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? I've seen another thread somewhere where an Apple engineer said there was no API at present, and that a workaround was to store the path yourself under a custom key. It seems to me that storing the name + parent directory would do the trick just as well. Or on 10.8+, there's NSURLPathKey too. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com