I am building on online file manager. One of the columns it displays is the file size, but this is always a high number of bytes. I would like to display the file size as does Windows Explorer, with a smaller number and the appropriate unit, e.g. `5 MB` instead of `5000000`. 

It isn't at all hard for me to do this, but I was wondering of Windows rather had a built in function to do this. Is there something already, or must I roll my own?