• 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: Accessible disks? Opinions requested.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessible disks? Opinions requested.


  • Subject: Re: Accessible disks? Opinions requested.
  • From: Ken Thomases <email@hidden>
  • Date: Wed, 11 Jun 2008 16:14:10 -0500

On Jun 11, 2008, at 3:55 PM, Neil Brewitt wrote:

I'm new to Cocoa, and I want to write an app which as a starting point enumerates all available mass storage devices, possibly including CD/DVDs, and presents the user with a list of mounted devices. Similar to what Installer does to choose the installation disk, but including non-writeable devices. I need to know which devices the user has selected.

I've searched for starting points and after extensive web/doc searching can find some hooks in Darwin and IOKit to find the devices - but seems unnecessarily complicated for what seems a commonish task. What is the "right" or "better" way to do this? The reason I'm posting here is that I was hoping there might be a magic Cocoa object which just does it for me(!).

Take a look at NSWorkspace, especially its -mountedLocalVolumePaths and -mountedRemovableMedia methods, as well as its NSWorkspaceDidMountNotification and NSWorkspaceDidUnmountNotification notifications.


For more in-depth information without delving into IOKit, check out the Disk Arbitration Framework. The documentation is largely in the headers, though.

Cheers,
Ken
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Accessible disks? Opinions requested.
      • From: Neil Brewitt <email@hidden>
References: 
 >Accessible disks? Opinions requested. (From: Neil Brewitt <email@hidden>)

  • Prev by Date: Re: NSTask(syslog)->NSPipe->NSFileHandle->readInBackgroundAndNotify buffers
  • Next by Date: Re: Accessible disks? Opinions requested.
  • Previous by thread: Accessible disks? Opinions requested.
  • Next by thread: Re: Accessible disks? Opinions requested.
  • Index(es):
    • Date
    • Thread