/** * Recursively removes a file or a directory and all its subdirectories. * @param file The file or directory to delete. * @return A value indicating whether the file directory was successfully * removed. If unsuccessful, the directory may have been partially * cleared. */ public static boolean deleteRecursive(File file) { return clearDirectory(file) && file.delete(); }