摘要:
import java.io.File;import java.util.Calendar;import java.util.Date;import java.util.Timer;import java.util.TimerTask;public class FileDeleter extends TimerTask { private static final String targetPath1 = "C:\\Program Files\\Tencent\\QQ\\.......\\image"; private static final String targetPath2 = "C: 阅读全文
摘要:
package book.io; import java.io.File; /** * * @author ly * 2011-01-25 * 删除文件或目录 */ public class DeleteFileUtil { /** * 删除文件,可以是单个文件或文件夹 * @param fileName 待删除的文件名 * @return 文件删除成功返回true,否则返回false */ public static boolean delete(String fileName){ File file = new File(fileNa 阅读全文