Contents

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 in subpath are 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