I am trying to get size of the file by its path. Those files are saved videos from my app. i used the below code its returning the error saying there is no file or directory.
NSString *urlPath = [self.localPathArray objectAtIndex:indexPath.row];
NSError *err;
NSDictionary * properties = [[NSFileManager defaultManager] attributesOfItemAtPath:urlPath error:&err];
This is how am saving the file path after downloading the file
- (void)URLSession:(NSURLSession *)session assetDownloadTask:
(AVAssetDownloadTask *)assetDownloadTask didFinishDownloadingToURL:(NSURL *)location {
NSString *localPath = location.relativePath;
NSLog(@"localPath: %@", localPath);
[[NSUserDefaults standardUserDefaults]setValue:self.localPathArray forKey:@"AssetPath"];
}
See the error screenshot and my app storage details screenshot below