public static void delfile (String path) {
File file = new File(path);
while (file.exists()) {
file.delete();
if (file.isDirectory()) {
File[] listFiles = file.listFiles();
for (File file1 : listFiles) {
delfile(file1.toString());
}
}
}
}
针对如下情况递归删除