Re: NSURL resourceValuesForKeys NSURLPathKey
Re: NSURL resourceValuesForKeys NSURLPathKey
- Subject: Re: NSURL resourceValuesForKeys NSURLPathKey
- From: Sean McBride <email@hidden>
- Date: Thu, 08 Jan 2015 22:17:46 -0500
- Organization: Rogue Research Inc.
On Thu, 8 Jan 2015 16:31:18 -0800, Trygve Inda said:
>I call:
>
>NSData* bookmarkData = [url
>bookmarkDataWithOptions:NSURLBookmarkCreationMinimalBookmark
>includingResourceValuesForKeys:nil
>relativeToURL:nil
>error:&inError];
>
>And later:
>
>NSDictionary* dict = [NSURL resourceValuesForKeys:[NSArray
>arrayWithObject:NSURLPathKey] fromBookmarkData:[self bookmark]];
>if (dict)
>{
> path = [dict objectForKey:NSURLPathKey];
>}
>
>Path ends up with the correct value even though I passed nil above...
When it resolves or fails to resolve? Probably only the former.
>includingResourceValuesForKeys:nil
>
>Is this documented behavior?
Dunno, but it reminds me of this:
<http://lists.apple.com/archives/cocoa-dev/2012/Oct/msg00299.html>
>I think I should be putting NSURLPathKey in the call to create the bookmark,
>but it does seem to work without it. Thoughts?
I would put it.
Cheers,
--
____________________________________________________________
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