USBDeviceSwift icon indicating copy to clipboard operation
USBDeviceSwift copied to clipboard

BSD Path of a mounted USB device

Open iboy opened this issue 5 years ago • 0 comments

Hi, is it possible to get the BSD Path of a mounted USB device by using / adapting this code? I've researched various interconnected stackoverflow responses:

https://stackoverflow.com/questions/40008280/usb-device-path-in-swift/46319129#46319129 https://stackoverflow.com/questions/39003986/usb-connection-delegate-on-swift/39026607#39026607 https://stackoverflow.com/questions/34628464/how-to-implement-ioservicematchingcallback-in-swift/39662693

Some posts mention BSD path. I can't see a straightforward kUSB key for it, to add it.

Currently, app gets the path by associating it with a mount notification - but that fails when a device is already connected when the app launches.

Having access to the BSD path / mount path in USBDevice would be super useful?

Thanks,

Ian Grant

iboy avatar May 07 '20 11:05 iboy