urls(forResourcesWithExtension:subdirectory:in:)
Returns an array containing the file URLs for all bundle resources having the specified filename extension, residing in the specified resource subdirectory, within the specified bundle.
Declaration
class func urls(forResourcesWithExtension ext: String?, subdirectory subpath: String?, in bundleURL: URL) -> [URL]?Parameters
- ext:
The filename extension of the files to locate.
If you specify an empty string or
nil, the extension is assumed not to exist and all of the files insubpathare returned. - subpath:
The name of the bundle subdirectory to search.
- bundleURL:
The file URL of the bundle to search.
Return Value
An array of file URLs for the resource files matching the criteria or an empty array if no files could be located.
See Also
Finding Resource Files
url(forResource:withExtension:subdirectory:)url(forResource:withExtension:)urls(forResourcesWithExtension:subdirectory:)url(forResource:withExtension:subdirectory:localization:)urls(forResourcesWithExtension:subdirectory:localization:)url(forResource:withExtension:subdirectory:in:)path(forResource:ofType:)path(forResource:ofType:inDirectory:)path(forResource:ofType:inDirectory:forLocalization:)paths(forResourcesOfType:inDirectory:)paths(forResourcesOfType:inDirectory:forLocalization:)path(forResource:ofType:inDirectory:)paths(forResourcesOfType:inDirectory:)