Instance Method インスタンスメソッド

urls(forResourcesWithExtension:subdirectory:localization:)

Returns an array containing the file URLs for all bundle resources having the specified filename extension, residing in the specified resource subdirectory, and limited to global resources and those associated with the specified localization. 指定されたファイル名拡張子を持ち、指定されたリソース下位ディレクトリに属して、そしてグローバルリソースでそして指定されたローカライゼーションと関連付けられるものに限られる、全てのバンドルリソースに対するファイルURLからなる配列を返します。

Declaration 宣言

func urls(forResourcesWithExtension ext: String?, 
subdirectory subpath: String?, 
localization localizationName: String?) -> [URL]?

Parameters パラメータ

extension

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. あなたが空の文字列またはnilを指定するならば、拡張子は存在しないとみなされます、subpathの中の全てのファイルが返されます。

subpath

The name of the bundle subdirectory to search. 調査することになるバンドル下位ディレクトリの名前。

localizationName

The language ID for the localization. This parameter should correspond to the name of one of the bundle's language-specific resource directories without the .lproj extension. ローカライゼーションに対する言語ID。このパラメータは、バンドルのもつ言語特有リソースディレクトリの1つの.lproj拡張子なしの名前と一致しなければなりません。

Return Value 戻り値

An array containing the file URLs for all bundle resources matching the specified criteria. This method returns an empty array if no matching resource files are found. 指定された基準に合致する全てのバンドルリソースに対するファイルURLを含んでいる配列。このメソッドは、合致するリソースファイルが見つけられないならば、空の配列を返します。

Discussion 議論

This method is equivalent to urls(forResourcesWithExtension:subdirectory:), except that only nonlocalized resources and those in the language-specific .lproj directory specified by localizationName are searched. このメソッドはurls(forResourcesWithExtension:subdirectory:)と等しいです、しかしローカライズされないリソースと言語特有.lprojディレクトリでlocalizationNameによって指定されるもの中のそういったものだけが検索されることを除きます。

See Also 参照

Finding Resource Files リソースファイルを見つける