Re: file sizes from NSFileManager
Re: file sizes from NSFileManager
- Subject: Re: file sizes from NSFileManager
- From: Greg Hulands <email@hidden>
- Date: Wed, 08 Oct 2003 13:47:51 +1000
b->kb->mb
don't divide by 8, that is bits->bytes.
b/ (1024*1024)
On Wednesday, October 8, 2003, at 01:13 PM, April Gendill wrote:
I don't understand how to obtain the file size from NSFileManager. I
get the dictionary and it has the file size key. The particular folder
I have been testing with is 12 megs . The dictionary key returns
15008530432 which is bytes. Now I must have my math off because I
thought megs was b / 8 / 1024 /1024.
The first problem I've has is that when I try to use nsvalue to extract
an unsigned long long the compiler tells me NSString does not respond
to unsignedLongLongValue. The only thing other than float, and int that
I can extract is a double. All of which gives me this number:
2123628544 which is so completely not even close to the number returned
in the dictionary. So.. Since I cannot pass the number in bytes because
it simply does not work for some reason I cannot fathom, how can I get
this byte number into a number I can break down to it's kilobyte or
megabyte size?
Thanks April.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.