I need to convert NSFileSystemSize to Gigabytes.
NSDictionary * fsAttributes = [ [NSFileManager defaultManager]
fileSystemAttributesAtPath:NSTemporaryDirectory()];
NSNumber *totalSize = [fsAttributes objectForKey:NSFileSystemSize];
NSString *sizeInGB = [NSString stringWithFormat:@"\n\n %3.2f GB",[totalSize floatValue] / 107374824];
//returns 69.86 GB
any ideas why it doesnt return at leat 8.0GB’s?
As a nit,
1024 * 1024 * 1024is1073741824, not107374824(you’re missing a 1 in the thousands place.)