0

Possible Duplicate:
How to get file size properly and convert it to MB, GB in Cocoa?

I have a double that is a number of bytes for each file. I want to create a string from this that is "friendly" and displays KB or MB as well as the converted number, e.g.:

  • 1.2 MB
  • 0.45 KB
  • 169 KB

Is there a NSString category or method to do this?

Community
  • 1
  • 1
Nic Hubbard
  • 41,587
  • 63
  • 251
  • 412

0 Answers0