Java: Get Device/Drive Name on Windows [duplicate]
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()
精彩评论