• 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: Tommy Knowlton <email@hidden>
  • Date: Thu, 23 Aug 2001 12:47:25 -0600

It Seems To Me (which is to say, I'm not claiming to be authoritative)

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.

Hope it helps,
--Tk!


On Wednesday, August 22, 2001, at 10:28 PM, cocoa-dev-
email@hidden wrote:

I'm using fileSystemAttributesAtPath:NSHomeDirectory() to get the total
disk
space via NSFileSystemSize, but it's returning 788MB when I really have
4700MB. NSFileSystemFreeSize returns a correct value of 2878MB. Does
anyone
know why NSFileSystemSize is returning an incorrect value?


  • Follow-Ups:
    • Re: NSFileSystemSize
      • From: Finlay Dobbie <email@hidden>
  • Prev by Date: Re: Help on adding help
  • Next by Date: Re: Transparent Knickers
  • Previous by thread: Re: NSFileSystemSize
  • Next by thread: Re: NSFileSystemSize
  • Index(es):
    • Date
    • Thread