Instance Method

removeCachedResourceValue(forKey:)

Removes the cached resource value identified by a given resource value key from the URL object.

Declaration

mutating func removeCachedResourceValue(forKey key: URLResourceKey)

Discussion

Removing a cached resource value may remove other cached resource values because some resource values are cached as a set of values, and because some resource values depend on other resource values (temporary resource values have no dependencies). This method is currently applicable only to URLs for file system resources.

See Also

Accessing Resource Values

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

Return a collection of resource values identified by the given resource keys.

func setResourceValues(URLResourceValues)

Sets the resource value identified by a given resource key.

func removeAllCachedResourceValues()

Removes all cached resource values and all temporary resource values from the URL object.

func setTemporaryResourceValue(Any, forKey: URLResourceKey)

Sets a temporary resource value on the URL object.

struct URLResourceKey

Keys that apply to file system URLs.

struct URLResourceValues

The properties supported by file system resources.

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