2011-10-23 2 views
0

iPhone SDKのドキュメントフォルダで、ファイル名の最後の部分を取得する方法を教えてください。「iPhones Documents」フォルダ内のファイルのファイル名はどのようにして見つけられますか?

/ユーザ/ユーザ/ライブラリ/ Application Support/iPhoneシミュレータ/ 5.0 /アプリケーション/ apptext /ドキュメント/ FILE.TXT

私はfile.txtと言う部分をしたい、とパスの残りの部分を無視し、 iPhone SDKを使ってどうすればいいですか?

答えて

0
NSString *path = "/Users/user/Library/Application Support/iPhone Simulator/5.0/Applications/apptext/Documents/File.txt" 

NSString *name = [path lastPathComponent]; 
関連する問題