We need to call file.exists() before file.delete() before we can delete a file E.g.
file.exists()
file.delete()
File file = ...; if (file.exists()){ fil
Use Apache Commons FileUtils.deleteDirectory() or FileUtils.forceDelete() to log exceptions in case of any failures,
or FileUtils.deleteQuietly() if you're not concerned about exceptions thrown.