/**
* 删除文件
*
* @param pathname
* @return
* @throws IOException
* @author HF .HS
*/
public static boolean deleteFile(String pathname) {
boolean result = false;
File file = new File(pathname);
if (file.exists()) {
file.delete();
result = true;
}
return result;
}
参数pathname为文件路径 返回值为boolean类型 希望对你有帮助