Instance Method

checkPromisedItemIsReachableAndReturnError(_:)

Returns whether the promised item can be reached.

Declaration

func checkPromisedItemIsReachableAndReturnError(_ error: NSErrorPointer) -> Bool

Parameters

error

The error that occurred when the promised item could not be reached.

Return Value

true if the promised item is reachable; otherwise, false.

Discussion

This method behaves identically to checkResourceIsReachableAndReturnError(_:), 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:

You must use this method instead of checkResourceIsReachableAndReturnError for any URLs returned by these methods.

See Also

Working with Promised Items

func promisedItemResourceValues(forKeys: [URLResourceKey]) -> [URLResourceKey : Any]

Returns the resource values for the properties identified by specified array of keys.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software