Forum Stats

  • 3,852,361 Users
  • 2,264,096 Discussions
  • 7,905,046 Comments

Discussions

list all drives

843810
843810 Member Posts: 46,938
edited Jul 8, 2010 8:24AM in Java Desktop Applications
How I can list all drives including portable drives using java? listRoots() not listing all drives in linux only listing "\" anyone please help

Comments

  • 843810
    843810 Member Posts: 46,938
    Linux file system has only one root drive unlike Windows which may have many root drives like c: d: e: etc.
    Like the API has spelled out, the root drive is a '/' in linux and all drives (a.k.a spaces like swap space) would be under that only.
    As far as my knowledge goes, the mounted drives would appear under 'mnt' directory, which would be somewhere under the root (I dont remember the location).
This discussion has been closed.