开发者

Java: Get Device/Drive Name on Windows [duplicate]

This question already has answers here: 开发者_高级运维 Acquiring drive names (as opposed to drive letters) in Java (3 answers) Closed 6 years ago.

I can get a list of drives plugged into a computer with File.listRoots(), but I only get the drive letter. How can I get the actual name of the drive (e.x. "Local Disk", "DVD RW Drive", etc.) as it's shown in Windows Explorer?


Use fileSystemView and the getSystemDisplayName()

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜