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

URLByAppendingPathComponent:isDirectory:

Returns a new URL made by appending a path component to the original URL, along with a trailing slash if the component is designated a directory. あるパス構成要素を、その構成要素がディレクトリを指定するならば後に引きずるスラッシュと一緒に、元のURLに追加することによって作られる新しいURLを返します。

Declaration 宣言

- (NSURL *)URLByAppendingPathComponent:(NSString *)pathComponent 
                           isDirectory:(BOOL)isDirectory;

Parameters パラメータ

pathComponent

The path component to add to the URL. URLに加えることになるパス構成要素。

isDirectory

If YES, a trailing slash is appended after pathComponent. YESならば、後に引きずるスラッシュがpathComponentの後に追加されます。

Return Value 戻り値

A new URL with pathComponent appended. pathComponentを追加された新しいURL。

Discussion 議論

If the original URL does not end with a forward slash and pathComponent does not begin with a forward slash, a forward slash is inserted between the two parts of the returned URL, unless the original URL is the empty string. 元のURLがフォワードスラッシュで終わらないそしてpathComponentがフォワードスラッシュで始まらないならば、1つのフォワードスラッシュがこの返されるURLの2つの部分の間に挿入されます、元のURLが空の文字列でない限り。

See Also 参照

Modifying and Converting a File URL ファイルURLを修正および変換する