Function

CFBundleCopyResourceURLsOfTypeInDirectory

Returns an array of CFURL objects describing the locations of all resources in a bundle of the specified type without needing to create a CFBundle object.

Declaration

CFArrayRef CFBundleCopyResourceURLsOfTypeInDirectory(CFURLRef bundleURL, CFStringRef resourceType, CFStringRef subDirName);

Parameters

bundleURL

The location of a bundle to examine.

resourceType

The abstract type of the resources to locate. The type is expressed as a filename extension, such as jpg.

subDirName

The name of the subdirectory of the bundle’s resources directory to search. Pass NULL to search the standard CFBundle resource locations.

Return Value

A CFArray object containing the CFURL objects of the requested resources. Ownership follows the The Create Rule.

Discussion

This function provides a means to obtain an array containing the locations of all of the requested resources without first creating a CFBundle object. However, since CFBundle objects cache search results, it is faster to create a CFBundle object if you need to repeatedly access resources.

Note that file names are case-sensitive, even on file systems (such as HFS+) that are not case sensitive with regards to file names.

See Also

Locating Bundle Resources

CFBundleCloseBundleResourceMap

Closes an open resource map for a bundle.

Deprecated
CFBundleCopyResourceURL

Returns the location of a resource contained in the specified bundle.

CFBundleCopyResourceURLInDirectory

Returns the location of a resource contained in the specified bundle directory without requiring the creation of a CFBundle object.

CFBundleCopyResourceURLsOfType

Assembles an array of URLs specifying all of the resources of the specified type found in a bundle.

CFBundleCopyResourceURLForLocalization

Returns the location of a localized resource in a bundle.

CFBundleCopyResourceURLsOfTypeForLocalization

Returns an array containing copies of the URL locations for a specified bundle, resource, and localization name.

CFBundleOpenBundleResourceFiles

Opens the non-localized and localized resource files (if any) for a bundle in separate resource maps.

Deprecated
CFBundleOpenBundleResourceMap

Opens the non-localized and localized resource files (if any) for a bundle in a single resource map.

Deprecated