Returns the value of the resource property for the specified key.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The location where the value for the resource property identified by
keyshould be stored.
The name of one of the URL’s resource properties.
The error that occurred in the case that the resource value cannot be retrieved.
value is successfully populated; otherwise,
This method behaves identically to
get, but works on promised items. A promised item is not guaranteed to have its contents in the file system until you use a file coordinator to perform a coordinated read on its URL, which causes the contents to be downloaded or otherwise generated. Promised item URLs are returned by various APIs, including:
The contents of the directory returned by the file manager’s
Ubiquitous Container Identifier:
The URL inside the accessor block of a coordinated read or write operation that used the
Coordinator Reading Immediately Available Metadata Only
Coordinator Writing For Deleting
Coordinator Writing For Moving
Coordinator Writing Content Independent Metadata Only
You must use this method instead of
get for any URLs returned by these methods.
This method works for any resource value that is not tied to the item’s contents. Some keys, like
NSURLGeneration, do not return valid values. If you use one of these keys, the method returns
YES, but the value returns