exense-basic-commons/src/main/java/ch/exense/commons/io/FileHelper.java
/**
	 * Requests that the directory denoted by this abstract pathname be deleted recursively when the virtual machine terminates
	 * @param folder the {@link File} to be deleted
	 */
Requests that the directory denoted by this abstract pathname be deleted recursively when the virtual machine terminates
@param folder the  File to be deleted
Requests that the directory denoted by this abstract pathname be deleted recursively when the virtual machine terminates @param folder the File to be deleted
public static void deleteFolderOnExit(File folder) {
		folder.deleteOnExit();
		File[] files = folder.listFiles();
		if (files != null) {
			for (File f : files) {
				if (f.isDirectory()) {
					deleteFolderOnExit(f);
				} else {
					f.deleteOnExit();
				}
			}
		}
	}
public static void deleteFolderOnExit ( File folder ) { folder . deleteOnExit ( ) ; File [ ] files = folder . listFiles ( ) ; if ( files != null ) { for ( File f : files ) { if ( f . isDirectory ( ) ) { deleteFolderOnExit ( f ) ; } else { f . deleteOnExit ( ) ; } } } }
Requests that the directory denoted by this abstract pathname be deleted recursively when the virtual machine terminates
 @param folder the {@link File} to be deleted
Requests that the directory denoted by this abstract pathname be deleted recursively when the virtual machine terminates @param folder the { @link File } to be deleted