File file = new File(path); if(file.exists()) { file.deleteOnExit(); Toast.makeText(this, "File deleted.", Toast.LENGTH_SHORT).show(); finish(); }else { Toast.makeText(this, "File not exists", Toast.LENGTH_SHORT).show(); }
Quote:deletes the file or directory defined by the abstract path name when the virtual machine terminates.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)