"deviceTypeForPath:"

  • Hi,
    I watch for the NSWorkspaceDidMount and Unmount notifications to see
    which devices there are. All working good.

    Except now I want to find out WHAT gets mounted... e.g. a CD, a DMG, a
    Network drive, an external HD.

    I do get pretty icons from NSWorkspace already :) So.. is there a nice
    cocoa way..... kinda like a: "deviceTypeForPath:"?

    Thanks,
    Dominik
  • I'm not aware of a Cocoa API, but it sounds like the DiskArbitration
    framework is what you need.  Specifically, a disk's description should
    include all the information you are looking for.  DiskArbitration uses
    CoreFoundation objects so the syntax and semantics should be familiar,
    and some of the data types are toll-free bridged with their Cocoa
    counterparts.  Leopard includes framework documentation in Xcode's
    documentation, but if you are on Tiger the header files in the
    framework and well-documented in HeaderDoc format.

    Aaron

    On Dec 27, 2007, at 6:11 PM, Dominik Pich wrote:

    > Hi,
    > I watch for the NSWorkspaceDidMount and Unmount notifications to see
    > which devices there are. All working good.
    >
    > Except now I want to find out WHAT gets mounted... e.g. a CD, a DMG,
    > a Network drive, an external HD.
    >
    > I do get pretty icons from NSWorkspace already :) So.. is there a
    > nice cocoa way..... kinda like a: "deviceTypeForPath:"?
    >
previous month december 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Go to today