Boolean CFURLCreateDataAndPropertiesFromResource(CFAllocatorRef alloc, CFURLRef url, CFDataRef *resourceData, CFDictionaryRef *properties, CFArrayRef desiredProperties, SInt32 *errorCode);
If you are interested in loading only the resource data or the resource's properties, pass NULL for one you don't want. If properties is non-NULL and desiredProperties is NULL then all properties are fetched. Note that as much work as possible is done even if FALSE is returned. For instance, if one property is not available, the others are fetched anyway.
Result: TRUE if successful, otherwise FALSE.
Name Description alloc The memory allocator to use. Pass kCFAllocatorDefault to use the system allocator. url The URL referring to the data and/or properties you wish to load. resourceData On return, a pointer to a CFData reference containing the data referred to by the specified URL. You are responsible for releasing the resource data. properties On return, a pointer to a CFDictionary reference containing the resource properties referred to by the specified URL. You are responsible for releasing the properties. desiredProperties A list of the properties you wish returned to you. errorCode 0 if successful, otherwise a CFURLError error code indicating the nature of the problem.
CFTypeRef CFURLCreatePropertyFromResource(CFAllocatorRef alloc, CFURLRef url, CFStringRef property, SInt32 *errorCode);
This is a convenience function which calls through to CFURLCreateDataAndPropertiesFromResource.
Result: TRUE if successful, otherwise FALSE.
Name Description alloc The memory allocator to use. Pass kCFAllocatorDefault to use the system allocator. url The URL referring to the resource whose properties you wish to load. property The name of the property you wish to load. Pass one of the provided string constants indicating the property. errorCode 0 if successful, otherwise a CFURLError error code indicating the nature of the problem.
Boolean CFURLDestroyResource(CFURLRef url, SInt32 *errorCode);
Result: TRUE if successful, otherwise FALSE.
Name Description url The URL of the resource you wish to destroy. errorCode On return, 0 if successful, otherwise a CFURLError error code indicating the nature of the problem.
Boolean CFURLWriteDataAndPropertiesToResource(CFURLRef url, CFDataRef dataToWrite, CFDictionaryRef propertiesToWrite, SInt32 *errorCode);
Properties not present in propertiesToWrite are left unchanged, hence if propertiesToWrite is NULL or empty, the URL's properties are not changed at all.
Result: TRUE if successful, otherwise FALSE.
Name Description url The resource you wish to write. dataToWrite The data to write. Pass NULL to write only properties. propertiesToWrite The properties to write. Pass NULL to write only data. errorCode 0 if successful, otherwise a CFURLError error code indicating the nature of the problem.
© 2000 Apple Computer, Inc. (Last Updated 7/20/2000)