0
我有这段代码,它将plist文件复制到users文件夹中的ApplicationSupport目录。将Plist文件复制到ApplicationSupport(Objective-C)中的自定义文件夹中
NSString *resourcePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:kAutonumberPlist];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
NSString *dataPath = [[paths objectAtIndex:0] stringByAppendingPathComponent:kAutonumberPlist];
NSFileManager *fileManager = [NSFileManager defaultManager];
if (![fileManager fileExistsAtPath:dataPath]) {
[fileManager copyItemAtPath:resourcePath toPath:dataPath error:nil];
}
如何CA改变它,这样,而不是将文件复制到〜用户/库/ ApplicationSupport,将其复制到〜用户/库/ ApplicationSupport/AnotherFolder。 “AnotherFolder”已经存在了。
谢谢!
谢谢您的帮助! – Michael