Here you can find the source of deleteFile(final String dirPath, final String fileName)
public static boolean deleteFile(final String dirPath, final String fileName)
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { public static boolean deleteFile(final String dirPath, final String fileName) { boolean ifDel = false; final File file = new File(dirPath + "/" + fileName); if (file.exists()) { ifDel = file.delete();/*from w w w .j ava2 s .c om*/ } return ifDel; } }