Here you can find the source of deleteFile(String FileName)
public static boolean deleteFile(String FileName)
//package com.java2s; //License from project: Apache License public class Main { public static boolean deleteFile(String FileName) { boolean bRet = false; if (FileName != null && FileName.length() > 0) { java.io.File filename = new java.io.File(FileName); if (filename.delete()) { bRet = true;// w ww. jav a 2s.c o m } } return bRet; } }