我只是想知道是否可以在 NSDocumentDirectory 中创建一个子文件夹并将数据写入该创建的文件夹,例如:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *dirPath =[[paths objectAtIndex:0] stringByAppendingPathComponent:@"TestFolder"];
NSString *filePath =[dirPath stringByAppendingPathComponent:@"testimage.jpg"];
[imageData writeToFile:filePath atomically:YES];
提前感谢您的支持!