objective c - How to get the file size given a path? -
I have the path to file in NSString. Is there a way to get its file size?
This one liner can help people:
unsigned Longer file size = [[[NSFileManager defaultManager] attributesOfItemAtPath: someFilePath error: zero] fileSize]; This gives the file size in bytes.
Comments
Post a Comment