Have you ever need to get all root of your system (C:/, D:/, E:/ etc) ? It is very simple with the below code:
Possible output:
...
File[] roots = File.listRoots();
for (File root : roots) {
System.out.println(root);
}
...
Possible output:
C:\
D:\
E:\
No comments:
Post a Comment