
Untitled
By: a guest on
May 15th, 2012 | syntax:
None | size: 0.40 KB | hits: 17 | expires: Never
xcode/ios: trying to copy files to caches folder on install
NSString* path=[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0];
path=[path stringByAppendingString:@"/plpart1.txt"];
NSError* error;
NSString* source=[[NSBundle mainBundle] pathForResource:@"pl_part1" ofType:@"txt"];
[[NSFileManager defaultManager] copyItemAtPath:source toPath:path error:&error];