• 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: "G. 'Andrew' Tapolow" <email@hidden>
  • Date: Mon, 14 May 2001 21:37:47 -0700

On Monday, May 14, 2001, at 11:48 AM, G. 'Andrew' Tapolow wrote:

Hello,

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.


To answer a few questions and add info that I've gotten so far.

As others have posted, I am trying to do this in Cocoa both because of the desire to work in the main OSX framework and I'm hoping to reduce the overhead that comes with Carbon compiled applications under OSX. I'm also trying to see if an application that can be programmed in carbon can be fully programmed under cocoa.

I got a reference from a similar post on OmniGroups osx-dev list concerning the NSWorkspace object which will give me a list of the paths for the mount points. Unfortunately, NSWorkspace only supplies the paths. Thus:

Given: MyOSXDrive, My9Drive, MyStolenMP3Drive

NSArray* myArray = [[NSWorkspace sharedWorkspace] mountedLocalVolumePaths];

Results in the following array:
{ @"/", @"/Volumes/My9Drive", @"/Volumes/MyStolenMP3Drive" }

This helps me find the mount point paths, however this does not help me convert them to their named volumes, especially to determine the name of the System Volume.

Unfortunately, I'm also trying to avoid unix-like calls. I guess you could simply declare me a bit NSMasochistic* on this project.

Thanks again,

G. "Andrew" Tapolow
Sr. Software Eng.
Apolo Productions

P.S.: The drive names are merely meant as examples with mild sardonic humour. Please, reply personally rather than starting a thread concerning their names.


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

  • Prev by Date: Re: Fastest/smallest search+replace
  • Next by Date: Re: Type/Creator codes
  • Previous by thread: Re: Volume Tracking in Cocoa without Carbon?
  • Next by thread: Re: Volume Tracking in Cocoa without Carbon?
  • Index(es):
    • Date
    • Thread