• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSFileSystemSize
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Re: NSFileSystemSize (From: Finlay Dobbie <email@hidden>)

  • Prev by Date: Re: Help on adding help
  • Next by Date: Re:Doc
  • Previous by thread: Re: NSFileSystemSize
  • Next by thread: resourcePath
  • Index(es):
    • Date
    • Thread