Find all drive letters in Java

前端 未结 5 893
花落未央
花落未央 2020-12-03 21:06

For a project I\'m working on. I need to look for an executable on the filesystem. For UNIX derivatives, I assume the user has the file in the mighty $PATH variable, but the

5条回答
  •  没有蜡笔的小新
    2020-12-03 21:38

    Use JNI. This is perfect for c++ code. Not only you can list all drives but also get the corresponding drive type (removable,local disk, or cd-rom,dvd-rom...etc)

提交回复
热议问题