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

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -