• 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: Volume Tracking in Cocoa without Carbon?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Volume Tracking in Cocoa without Carbon?


  • Subject: Re: Volume Tracking in Cocoa without Carbon?
  • From: Trevor McCulloch <email@hidden>
  • Date: Mon, 14 May 2001 20:15:25 -0400

On Monday, May 14, 2001, at 02:48 PM, G. 'Andrew' Tapolow wrote:

I'm looking for a method to get a list of mounted volumes (and theoretically their icons). At the same time I am looking for something like system even messages for disk mount and disk eject. I know where these were in the Mac OS APIs and thus know where I could look for them in Carbon. However, my goal is to work these into a Cocoa (obj-c) only app through Project Builder and have had no luck finding NSObjects or the appropriate framework through header files or documentation.

There are a few UNIXEN solutions to this problem. The one closest to what you are looking for is getfsstat() (man 2 getfsstat) which returns an array of statfs structures about all of the mounted file systems.

A slightly less elegant solution would be to read the /dev filesystem looking for disk devices, then use the method readlabelfs() (man 3 readlabelfs) to get information on the partition.

Trevor McCulloch


References: 
 >Volume Tracking in Cocoa without Carbon? (From: "G. 'Andrew' Tapolow" <email@hidden>)

  • Prev by Date: Re: Volume Tracking in Cocoa without Carbon?
  • Next by Date: Re: Volume Tracking in Cocoa without Carbon?
  • Previous by thread: Re: Volume Tracking in Cocoa without Carbon?
  • Next by thread: Re: Volume Tracking in Cocoa without Carbon?
  • Index(es):
    • Date
    • Thread