列出文件系统根目录
import java.io.File; public class Main {/* from N o w J a v a . c o m*/ public static void main(String[] argv) throws Exception { File[] roots = File.listRoots(); for (int i = 0; i < roots.length; i++) { // process(roots[i]); } } }
import java.io.File; public class Main {/* from N o w J a v a . c o m*/ public static void main(String[] argv) throws Exception { File[] roots = File.listRoots(); for (int i = 0; i < roots.length; i++) { // process(roots[i]); } } }