递归注意事项:

递归算法遍历目录
递归算法删除目录:
package wwx;
import jdk.swing.interop.SwingInterOpUtils;
import java.io.File;
import java.io.IOException;
public class Test {
public static void main(String[] args) {
File f = new File("E:\\wwx\\ww");
getAllFile(f);
}
public static void getAllFile(File file) {
File[] files = file.listFiles();
if (files == null) {
return;
}
for (File f : files) {
if (f.isDirectory()) {
getAllFile(f);
} else {
System.out.println("删除了的文件目录"+f.getAbsoluteFile());
f.delete();
}
}
file.delete();
}
}

