-2

フォルダのURLからすべてのファイル名を取得するには? 以下のコードは null を返します。

path = @"http://localhost/urlFolder/images/";

NSArray *directoryContent = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:path error:NULL];
4

1 に答える 1

0

別の方法を試しましたかNSFileManager

- (NSArray *)contentsOfDirectoryAtURL:(NSURL *)url includingPropertiesForKeys:(NSArray *)keys options:(NSDirectoryEnumerationOptions)mask error:(NSError **)error

contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:代わりに使用できますcontentsOfDirectoryAtPath:error:

それを試してみてください。ハッピーコーディング。:)

于 2012-11-01T06:53:16.647 に答える