摘要:
需求:1,遍历一个文件夹,输出所有子目录及其子目录下的文件。 2,递归删除一个文件夹。 1 package File; 2 import java.io.File; 3 4 public class TraverseFile { 5 public static void main(String[] args) { 6 File file = new File("d:\\Demo"); 7 listAll(file,0); 8 } 9 10 public static void listAll(File file,int level)... 阅读全文