---
title: "CFURLCopyResourcePropertiesForKeys(_:_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfurlcopyresourcepropertiesforkeys(_:_:_:)"
---

# CFURLCopyResourcePropertiesForKeys(_:_:_:)

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

## Declaration

```swift
func CFURLCopyResourcePropertiesForKeys(_ url: CFURL!, _ keys: CFArray!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Unmanaged<CFDictionary>!
```

## Parameters

- `url`: The URL.
- `keys`: An array of property keys for the desired resource properties.
- `error`: The error that occurred if one or more resource values could not be retrieved. This parameter is optional. If you are not interested in receiving error information, you can pass nil.

## Return Value

Return Value A dictionary of resource values indexed by key, or NULL if an error occurs.

## Discussion

Discussion This function first checks if the URL object already caches the specified resource values. If so, it returns the cached resource values to the caller. If not, then this function synchronously obtains the resource values from the backing store, adds the resource values to the URL object’s cache, and returns the resource values to the caller. The type of the returned resource value varies by resource property; for details, see the documentation for the key you want to access. If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available for the specified URL, and no errors occurred when determining those resource properties were not available. If an error occurs, this function returns NULL and populates the object pointer referenced by error with additional information. note: This method applies only to URLs that represent file system resources.

## See Also

### Related Documentation

- [CFURL](corefoundation/cfurl.md)

### Getting and Setting File System Resource Properties

- [CFURLClearResourcePropertyCache(_:)](corefoundation/cfurlclearresourcepropertycache(_:).md)
- [CFURLClearResourcePropertyCacheForKey(_:_:)](corefoundation/cfurlclearresourcepropertycacheforkey(_:_:).md)
- [CFURLCopyResourcePropertyForKey(_:_:_:_:)](corefoundation/cfurlcopyresourcepropertyforkey(_:_:_:_:).md)
- [CFURLCreateResourcePropertiesForKeysFromBookmarkData(_:_:_:)](corefoundation/cfurlcreateresourcepropertiesforkeysfrombookmarkdata(_:_:_:).md)
- [CFURLCreateResourcePropertyForKeyFromBookmarkData(_:_:_:)](corefoundation/cfurlcreateresourcepropertyforkeyfrombookmarkdata(_:_:_:).md)
- [CFURLSetResourcePropertiesForKeys(_:_:_:)](corefoundation/cfurlsetresourcepropertiesforkeys(_:_:_:).md)
- [CFURLSetResourcePropertyForKey(_:_:_:_:)](corefoundation/cfurlsetresourcepropertyforkey(_:_:_:_:).md)
- [CFURLSetTemporaryResourcePropertyForKey(_:_:_:)](corefoundation/cfurlsettemporaryresourcepropertyforkey(_:_:_:).md)
