Macos – Getting mount point when a USB device is inserted Mac OS X and linux

devicemacosmountpointusb

I am trying to develop a program in Mac OS and Linux which lists the files and folders in USB drive. I need to get the some events when USB device is connected and removed. I know that in Mac OS X I can use IOKit. But I do n't know how to get the mount point where the device is mounted. Can I get it using IOkit? Is there any cross platform solution for Linux and Mac?

Best Answer

No, there isn't. Under Linux you may use HAL or DeviceKit-disks D-Bus interfaces. Note those are optional components and may be absent. HAL is older and DeviceKit-disks is newer implementations, with DK-d replacing HAL.

Related Topic