in java, you can use File.listRoots() to get all drives in the system. I'm looking to get only the external drives, i.e. USB drives, external hard disks, optical drives, floppy etc'.
is there any way to do it in java? if not, native c++ code would be good as well. in that case, i need both windows and linux code
thanks