Sea*_*ean 5 directory objective-c nsdocument
我只是想知道是否可以在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];
Run Code Online (Sandbox Code Playgroud)
在此先感谢您的支持!