Here you can find the source of DeleteFile(String _filePath)
public static void DeleteFile(String _filePath)
//package com.java2s; // modify it under the terms of the GNU General Public License import java.io.File; public class Main { public static void DeleteFile(String _filePath) { if (_filePath == null || _filePath.isEmpty()) { return; }//from w w w . j a v a2 s . c o m File file = new File(_filePath); if (file.exists()) { try { if (!file.delete()) { } } catch (Exception e) { e.printStackTrace(); } } } }