|
Java™ by example!
|
|
|
How do I list the available system roots?
Use the method listRoots in the File class. Notice that this is filesystem dependent. On Unix, there is only one system root: "/". On Windows, it depends on drives that are mapped. Here's an example: Main.java:
outputs on my machine:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|