• 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
NSURL resourceValuesForKeys NSURLPathKey
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSURL resourceValuesForKeys NSURLPathKey


  • Subject: NSURL resourceValuesForKeys NSURLPathKey
  • From: Trygve Inda <email@hidden>
  • Date: Thu, 08 Jan 2015 16:31:18 -0800
  • Thread-topic: NSURL resourceValuesForKeys NSURLPathKey

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...

includingResourceValuesForKeys:nil

Is this documented behavior?

I think I should be putting NSURLPathKey in the call to create the bookmark,
but it does seem to work without it. Thoughts?




_______________________________________________

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


  • Follow-Ups:
    • Re: NSURL resourceValuesForKeys NSURLPathKey
      • From: Sean McBride <email@hidden>
    • Re: NSURL resourceValuesForKeys NSURLPathKey
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Machine sleep & wake notifications in a daemon
  • Next by Date: Re: NSURL resourceValuesForKeys NSURLPathKey
  • Previous by thread: Re: deny file-read-data after launch
  • Next by thread: Re: NSURL resourceValuesForKeys NSURLPathKey
  • Index(es):
    • Date
    • Thread