-(IBAction)downloadBtnPressed{
NSArray *paths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory,
NSUserDomainMask, YES);
NSString *path = [paths objectAtIndex:0];
NSString *subDirPath = [path stringByAppendingPathComponent:@"allFiles"];
dirPath = subDirPath;
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString *fileName = [tempPath lastPathComponent];
downloadPath = [dirPath stringByAppendingPathComponent:fileName];
NSLog(@"tempPath...%@",tempPath);
NSLog(@"downloadPath...%@",downloadPath);
[fileManager copyItemAtPath:tempPath toPath:downloadPath error:nil];
}
No comments:
Post a Comment