Java tutorial
//package com.java2s; import android.content.Context; import java.io.File; public class Main { static public void deleteReceiptImage(Context ctxt, int tripId, String imgName) { File file = new File(ctxt.getExternalFilesDir(null) + "/" + tripId, imgName); if (file.exists()) { boolean test = file.delete(); assert test; } } }