Instance Method

removeCachedResourceValue(forKey:)

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

Declaration

func removeCachedResourceValue(forKey key: URLResourceKey)

Parameters

key

The resource value key whose cached values you want to remove.

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: [URLResourceKey])

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

func getResourceValue(AutoreleasingUnsafeMutablePointer<AnyObject?>, forKey: URLResourceKey)

Returns the value of the resource property for the specified key.

func setResourceValue(Any?, forKey: URLResourceKey)

Sets the URL’s resource property for a given key to a given value.

func setResourceValues([URLResourceKey : Any])

Sets the URL’s resource properties for a given set of keys to a given set of values.

func removeAllCachedResourceValues()

Removes all cached resource values and 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.