Question

I'm working on a utility that will scan USB ports and mount any Mass Storage devices it finds. I can poll for changes ( with a patched version of Ruby-USB ) but would much rather get a notification, or subscribe to some event.

Is there a way for Ruby to be tickled when a USB stick is inserted?

Was it helpful?

Solution

Check out ruby-dbus. There is also a tutorial for it as well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top