package it.cast;
import java.io.File;
/**
* 1,1,2,4,7,13,24...
*
* @author Administrator
*
*/
public class Demo {
public static void main(String[] args) {
File file = new File("D:\\bbb");
delectdemo(file);
}
private static void delectdemo(File file) {
File[] file1 = file.listFiles();
if (file1 != null) {
for (File f : file1) {
if (f.isDirectory()) {
delectdemo(f);
} else {
f.delete();
}
file.delete();
}
}
}
}
|
|