NSFilSize is only returns 192 for any file path

128 views Asked by At

i tried with attributesOfItemAtPath of NSFileManager to get file size of previously saved video. it's only returning 192 always.

NSDictionary *assetDIct = [[NSFileManager defaultManager] attributesOfItemAtPath:[assetUrl path] error:&err];
NSLog(@"file size %llu for file %@",assetDIct.fileSize,assetUrl.path);

i got zero by using NSFileHandle

unsigned long long fsize = [[NSFileHandle fileHandleForReadingAtPath:[assetUrl path]] seekToEndOfFile];
NSLog(@"File size: %d", fsize);

The file path is

/var/mobile/Containers/Data/Application/4567DC4F-7F90-41BC-864E-D0FF2ECD9BA1/Library/com.apple.UserManagedAssets.sx8JGn/rajeev_653436252DF034A0.movpkg

0

There are 0 answers