0
plist 파일을 사용자 폴더의 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