Java tutorial
//package com.java2s; import java.io.File; import android.content.Context; public class Main { public static void deleteTempPackageFile(Context context, String pathOnSDCard) { File file = new File(pathOnSDCard); File tmpPackageFile = context.getFileStreamPath(file.getName()); if (tmpPackageFile == null) { return; } if (tmpPackageFile.exists()) { tmpPackageFile.delete(); } } }