Java examples for File Path IO:File System
List Filesystem roots
import java.io.File; public class Main { public static void main(String[] args) { File[] rootDirectories = File.listRoots(); System.out.println("Available root directories in filesystem are : "); for (int i = 0; i < rootDirectories.length; i++) { System.out.println(rootDirectories[i]); }/* w w w . j a v a2 s . co m*/ } }