删除目录
/* 来 自 nowjava*/ //package com.nowjava; import java.io.File; public class Main { public static boolean deleteDirectory(File path) { if (path.exists()) { File[] files = path.listFiles(); for (int i = 0; i < files.length; i++) { if (files[i].isDirectory()) { deleteDirectory(files[i]); } else {/**from 时 代 Java - nowjava.com**/ files[i].delete(); } } } return (path.delete()); } }