Instance Method


Returns whether the promised item URL’s resource exists and is reachable.


func checkPromisedItemIsReachable() throws -> Bool


This method synchronously checks if the resource’s backing store is reachable. Checking reachability is appropriate when making decisions that do not require other immediate operations on the resource, e.g. periodic maintenance of UI state that depends on the existence of a specific document. When performing operations such as opening a file or copying resource properties, it is more efficient to simply try the operation and handle failures. This method is currently applicable only to URLs for file system resources. For other URL types, false is returned.

See Also

Working with Promised Items

func promisedItemResourceValues(forKeys: Set<URLResourceKey>) -> URLResourceValues

Gets resource values from URLs of ‘promised’ items.