Type Method 型メソッド

pathWithComponents:

Returns a string built from the strings in a given array by concatenating them with a path separator between each pair. 各対の間にひとつのパス分離子でそれらを連結することによって、与えられた配列の中の文字列から組み立てられる文字列を返します。

Declaration 宣言

+ (NSString *)pathWithComponents:(NSArray<NSString *> *)components;

Parameters パラメータ

components

An array of NSString objects representing a file path. To create an absolute path, use a slash mark (“/”) as the first component. To include a trailing path divider, use an empty string as the last component. ファイルパスを表しているNSStringオブジェクトからなる配列。絶対パスを作成するには、スラッシュの印(“/”)を最初の構成要素として使ってください。後に続くパスを分割するものを含めるには、空の文字列を最後の構成要素として使ってください。

Return Value 戻り値

A string built from the strings in components by concatenating them (in the order they appear in the array) with a path separator between each pair. componentsの中の文字列それらから、各対の間にひとつのパス分離子でそれらを連結すること(それらが配列において現れる順番で)によって作られる、ある文字列。

Discussion 議論

This method doesn’t clean up the path created; use stringByStandardizingPath to resolve empty components, references to the parent directory, and so on. このメソッドは作成されたパスを掃除しません;stringByStandardizingPathを使って、空の構成要素、親ディレクトリに対する参照、などを解決してください。

See Also 参照

Working with Paths パスを扱う