Detect USB Drive in Java

前端 未结 6 504
故里飘歌
故里飘歌 2020-12-01 06:35

How can I detect when a USB drive is attached to a computer in Windows, Linux, or Mac?

The only way I have seen online to do this is to iterate the drives, but I don

6条回答
  •  温柔的废话
    2020-12-01 07:14

    Check out this code. To fulfill your demands, simply poll to detect the USB drive and continue when you got it.

提交回复
热议问题