pub fn detect_raw_devices() -> Result<Vec<RawDevice>>Expand description
Detect the raw device descriptors, you will use this function whenever you want to find which devices are connected, then you may open one or all of these devices, to properly manage the device properties, its storage, files, etc.
ยงExample
use libmtp_rs::raw::detect_raw_devices;
let raw_devices = detect_raw_devices().expect("Failed to detect raw devices");
// Try to open the first device
let mtp_device = raw_devices
.get(0)
.map(|r| r.open_uncached())
.transpose()
.expect("Couldn't open raw device");