これにファイル名の文字列を追加すれば特定ファイルのフルパスが取得できます。
------------------
NSString* path = [NSHomeDirectory() stringByAppendingPathComponent:@"aaa.txt"];
------------------
ファイル名を追加する時は、NSMutableStringクラスのインスタンスメソッドである「stringByAppendingPathComponent」を使います。これを使うと追加する文字列の先頭にスラッシュが入ります。
普通の文字列追加メソッド「appendString」ではスラッシュ


0 件のコメント:
コメントを投稿