Get path of inserted usb in dbus
I'm writing a program in python using dbus that detects inserted usb drives and manipulates the files inside of them. However, I can't seem to retrieve the path on my system of an inserted usb. Is there someway that I can get the path of an inserted usb in dbus, perhaps by using the GetProperty() method? I have tried using GetProperty("block.device"), but that returns /dev/sdc1 which doesn't exist on my system. T开发者_开发百科hanks in advance for any help!
Try the "NativePath" Property.
Here is an example of getting the property (using C# not python) https://bitbucket.org/hindlemail/udisk-sharp/src/1a4d3e031fa1/src/test/Main.cs
精彩评论