iphone 文件系统 读写document中的文件
1利用FileManage来读取document的文件
NSFileManager *fileManager = [NSFileManager defaultManager];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSError *error = nil;
NSArray *fileList = [[NSArray alloc] init];
fileList = [fileManager contentsOfDirectoryAtPath:documentsDirectory error:&error];
for (NSString *file in fileList) {
NSLog(@"fileName is :%@",file);
}