I am using statfs() which gives me the free blocks available to a non-superuser.
I am unsure how to convert this into KB/MB/GB.
The values that are returned are:
fundamental file system block size: 4096
total data blocks in file system: 3805452
free blocks in fs: 63425
free blocks avail to non-superuser: 63425
total file nodes in file system: 3805450
free file nodes in fs: 63425
The value I am interested is saying 63425, but I am not sure what that means KB/MB/GB wise.
I am running this on the iPhone and an application is supposed to have access to 2GB I believe, if that much is open on the device, which in my case I do.
So I should be getting a value somewhere around 2G, I would think.
I ran 63425 against an online blocks to MB converter but that gives me a result of 30MB which shouldn't be the case.
Can anyone help me in figuring out how to get KB/MB/GB from this info?
Thanks.