第1个回答 2013-10-23
简单的说就是
public void ListFile(File file){
File[] fileList = file.listFiles();
for(int i = 0; i < fileList.length;i++){
if(fileList[i].isDirectory()){
ListFile(fileList[i]);
}else if(fileList[i].isFile()){
System.out.println(fileList[i].getName());
}
}
}
前边加上对参数合法性的判断,里边在加上你要的处理过程。