I have a path to file contained in an NSString. Is there a method to get its file size?
This one liner can help people:
unsigned long long fileSize = [[[NSFileManager defaultManager] attributesOfItemAtPath:someFilePath error:nil] fileSize];
This returns the file size in Bytes.
2.1m questions
2.1m answers
60 comments
57.0k users