/** * Easy to use file delete (works for both files and directories). * * <p>Recursively deletes the contents of the specified directory, and finally wipes out the * directory itself. For each file that cannot be deleted a warning log will be issued. * * @param file File to remove * @return true if any file present is removed */ public static boolean delete(File file) { if (file.isDirectory()) { emptyDirectory(file); } return file.delete(); }