Re: NSFileSystemSize
Re: NSFileSystemSize
- Subject: Re: NSFileSystemSize
- From: Michael Stone <email@hidden>
- Date: Thu, 23 Aug 2001 13:55:22 -0600
On Thursday, August 23, 2001, at 07:47 pm, Tommy Knowlton wrote:
>
Looking at the docs for fileSystemAttributesAtPath, it seems probable
>
that your 4700MB overflows 32 bits worth of unsigned int, if units are
>
bytes.
>
>
Then, the high-order stuff having OF'ed out, you might be seeing that
>
788MB == (4700MB) % (1 << 32).
>
>
That doesn't seem to be "quite" mathematically correct, though I'm
>
guessing there is lots of rounding/estimation error in the figures you
>
supplied.
Good eye, Tommy. Thanks. Since the smaller number was so close to the larger
number and it worked, I didn't notice the overflow.
On 8/23/01 1:31 PM, Finlay Dobbie at email@hidden wrote:
>
Taking into account the large sizes of modern disks, perhaps it should
>
be upgraded to unsigned long?
Actually, I was already using an unsigned long. It needs to be an unsigned
long long.