Hi I have the following code:
NSNumber *fs = [[[NSFileManager defaultManager] fileAttributesAtPath:applicationPath traverseLink:NO] objectForKey:NSFileSize];
Which returns the file size in bytes for my file (an NSString called applicationPath). I want to convert this to megabytes, rounded off to 2 decimal places. How would I do this?
Thanks
P.S. Sorry for these basic questions, Im an ObjC newbie
NSNumber *fs = [[[NSFileManager defaultManager] fileAttributesAtPath:applicationPath traverseLink:NO] objectForKey:NSFileSize];
Which returns the file size in bytes for my file (an NSString called applicationPath). I want to convert this to megabytes, rounded off to 2 decimal places. How would I do this?
Thanks
P.S. Sorry for these basic questions, Im an ObjC newbie