availableDatadesigned to read files. If you just want to know the file size, you actually do not need to open it. Just use NSFileManageras follows:
NSDictionary *attributes = [[NSFileManager defaultManager] attributesOfItemAtPath:self.finalPath error:NULL];
unsigned long long fileSize = [attributes fileSize];
source
share