开发者

Can Ruby tell when a USB memory stick is plugged into a USB port on Linux?

I'm working on a utility that will scan USB ports and mount any Mass Storage devices it finds. I 开发者_如何学JAVAcan 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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜