/** * 删除题目测试数据目录下的文件 * * @param pid 题目本地id * @param filename 文件名 * @return true成功、false失败 */ public static boolean delFile(int pid, String filename) { File file = new File(rootPath + "data\\" + pid + "\\" + filename); if (file.isFile()) { if (!file.delete()) { Tool.log("Can not delete file:" + file.getAbsolutePath()); return false; } return true; } return false; }