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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to