Android examples for java.io:File Delete
delete a single file
import java.io.File; import android.util.Log; public class Main { private static final String TAG = ""; public static boolean delete(File file) { if (file != null && file.exists()) { if (!file.delete()) { Log.w(TAG, "Failed to delete file " + file); return false; }/*from ww w. ja v a2s . c om*/ Log.i(TAG, "Deleted file " + file); } return true; } }