Java examples for File Path IO:File System
To extract the file system root directories as an array of File
import java.io.File; public class Main { public static void main(String[] args) { File[] roots = File.listRoots(); for (File root : roots) { System.out.println(root);/*ww w . ja v a2 s. c o m*/ } } }