Reputation: 7620
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. Thanks in advance for any help!
Upvotes: 0
Views: 995
Reputation: 6729
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
Upvotes: 1