src/main/java/com/github/fritaly/dualcommander/Utils.java
public static void deleteRecursively(File file, FileHandler handler) {
		// The given file can be a file or a directory
		// The given listener can be null
		Validate.notNull(file, "The given file is null");

		if (file.isDirectory()) {
			// Delete the directory recursively
			for (File entry : file.listFiles()) {
				deleteRecursively(entry, handler);
			}
		}

		// Delete the file or the empty directory
		file.delete();

		if (handler != null) {
			handler.handle(file);
		}
	}
/**
	 * Recursively deletes the given file or directory and notifies the provided
	 * handler when a file / directory has been deleted.
	 *
	 * @param file
	 *            the file / directory to delete. Can't be null.
	 * @param handler
	 *            a possible listener to be notified of file deletions. Can be
	 *            null.
	 */
Recursively deletes the given file or directory and notifies the provided
handler when a file / directory has been deleted.

@param file
the file / directory to delete. Can't be null.
@param handler
a possible listener to be notified of file deletions. Can be
null.
Recursively deletes the given file or directory and notifies the provided handler when a file / directory has been deleted . @param file the file / directory to delete . Can ' t be null . @param handler a possible listener to be notified of file deletions . Can be null .
public static void deleteRecursively(File file, FileHandler handler) {
		Validate.notNull(file, "The given file is null");
		if (file.isDirectory()) {
			for (File entry : file.listFiles()) {
				deleteRecursively(entry, handler);
			}
		}
		file.delete();
		if (handler != null) {
			handler.handle(file);
		}
	}
public static void deleteRecursively ( File file , FileHandler handler ) { Validate . notNull ( file , "The given file is null" ) ; if ( file . isDirectory ( ) ) { for ( File entry : file . listFiles ( ) ) { deleteRecursively ( entry , handler ) ; } } file . delete ( ) ; if ( handler != null ) { handler . handle ( file ) ; } }
Recursively deletes the given file or directory and notifies the provided
 handler when a file / directory has been deleted.
Recursively deletes the given file or directory and notifies the provided handler when a file / directory has been deleted .
// The given file can be a file or a directory // The given listener can be null // Delete the directory recursively // Delete the file or the empty directory