CFURLCreatePropertyFromResource(_:_:_:_:)
Returns a given property specified by a given URL and property string.
Declaration
func CFURLCreatePropertyFromResource(_ alloc: CFAllocator!, _ url: CFURL!, _ property: CFString!, _ errorCode: UnsafeMutablePointer<Int32>!) -> CFTypeRef!Parameters
- alloc:
The allocator to use to to allocate memory for the new
CFTypeobject for the requested property. PassNULLor kCFAllocatorDefault to use the current default allocator. - url:
The
CFURLobject referring to the resource whose properties are loaded. - property:
The name of the property you wish to load. Pass one of the provided string constants indicating the property. See File Url Properties and Http Url Properties for the list of available properties.
- errorCode:
On return,
0if successful, otherwise an error code indicating the nature of the problem. See Cfurlerror for a list of possible error codes.
Return Value
If successful, the requested property as a CFType object, NULL otherwise. Ownership follows the The Create Rule.
Discussion
This is a convenience function for retrieving individual property values which calls through to CFURLCreateDataAndPropertiesFromResource(_:_:_:_:_:_:).