标签:
public class Hello{ public static void main(String args[]) throws Exception{ File file = new File("E:" + File.separator); list(file); } public static void list(File file){ if(file.isDirectory()){ File result[] = file.listFiles(); if(result != null){ for(int i=0; i<result.length; i++){ list(result[i]); } } } System.out.println(file); } }
标签:
原文地址:http://www.cnblogs.com/cyxxzjp/p/5808171.html