Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
アプリのドキュメント フォルダーにいくつかのファイルを保存しています。これらのファイルの名前を NSArray オブジェクトに保存したいと思います。たとえば、アプリに one、two、three という 3 つの csv ファイルがあります。そして、これらの名前を NSArray で取得したいと考えています。XCode 4.4.1 と iOS 5 を使用しています。
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSError *error = nil; NSArray *files = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:[paths objectAtIndex:0] error:&error];