• 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: Calculating volume free space
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calculating volume free space


  • Subject: Re: Calculating volume free space
  • From: Dair Grant <email@hidden>
  • Date: Mon, 16 Jan 2006 02:24:40 +0000

email@hidden wrote:

>I would like to calculate the volume free space (a la Finder's Get
>Info) but I am not getting the results I expected.
...
>Is there another API I should be using besides statfs?  I couldn't find
>anything appropriate in NSWorkspace or NSFileManager.

Apart from the potential for overflow, statfs doesn't quite match the
values displayed by the Finder.

The Finder uses FSGetVolumeInfo; if you want a more exact match, this
can give you the total/free values in bytes as well as blocks.


-dair
___________________________________________________
mailto:email@hidden     http://www.zonic.co.uk/
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Endian-ness of four-char constants (Was: Endian-ness of "PkgInfo" file)
  • Next by Date: Re: Question regarding NSArrayController, KVO and Core Data
  • Previous by thread: Re: Calculating volume free space
  • Next by thread: DND & CoreData just a small blow of hand?
  • Index(es):
    • Date
    • Thread