device path from mount path?

  • I'd like to get the device path (ie: /dev/disk1s0, etc) for each
    mounted volume. I've figured out that NSWorkspace
    mountedLocalVolumePaths lists all the volumes. And that
    file(System)AttributeAtPath gives some interresting information. But
    I'm at a loss as how to translate this into a device path.

    Any help? I don't want to launch any command line tools, like "mount".
  • Hi,

    have a look at the man page of getfsstat (2)

    Hope this helps,
    Christoph

    > I'd like to get the device path (ie: /dev/disk1s0, etc) for each
    > mounted volume. I've figured out that NSWorkspace
    > mountedLocalVolumePaths lists all the volumes. And that
    > file(System)AttributeAtPath gives some interresting information. But
    > I'm at a loss as how to translate this into a device path.
    >
    > Any help? I don't want to launch any command line tools, like "mount".
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/<cnadig...>
    >
    > This email sent to <cnadig...>
  • 2006/11/14, Christoph Nadig <cnadig...>:
    > Hi,
    >
    > have a look at the man page of getfsstat (2)
    >
    > Hope this helps,

    Thanks. That works (actually, I'm using statfs). Part of the problem
    was I didn't know what to man/Google for.

    Rhetorical Q: I wonder why Apple chose to not include this information
    in fileSystemAttributesAtPath:.
previous month november 2006 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      
Go to today