java/automation/src/main/java/be/bosa/dt/best/automation/util/Utils.java
/**
	 * Recursively delete a directory and files / subdirectories
	 * 
	 * @param p root path
	 * @return false on error
	 */
Recursively delete a directory and files / subdirectories

@param p root path
@return false on error
Recursively delete a directory and files / subdirectories @param p root path @return false on error
public static boolean recursiveDelete(Path p) {
		if (p == null) {
			return true;
		}
		LOG.infof("Delete directory %s", p);
		try {
			Files.walk(p).sorted(Comparator.reverseOrder()).map(Path::toFile).forEach(File::delete);
		} catch(IOException ioe) {
			return false;
		}
		return true;
	}
public static boolean recursiveDelete ( Path p ) { if ( p == null ) { return true ; } LOG . infof ( "Delete directory %s" , p ) ; try { Files . walk ( p ) . sorted ( Comparator . reverseOrder ( ) ) . map ( Path :: toFile ) . forEach ( File :: delete ) ; } catch ( IOException ioe ) { return false ; } return true ; }
Recursively delete a directory and files / subdirectories
Recursively delete a directory and files / subdirectories