question: public static boolean deleteDirectoryAndContents ( File rootDirectory ) { if ( ( rootDirectory == null ) || ! rootDirectory . isDirectory ( ) ) { return false ; } try { String [ ] directoryContents = rootDirectory . list ( ) ; for ( int i = 0 ; i < directoryContents . length ; i ++ ) { boolean success = deleteDirectoryAndContents ( new File ( rootDirectory , directoryContents [ i ] ) ) ; if ( ! success ) { return false ; } } return rootDirectory . delete ( ) ; } catch ( Exception e ) { logger . debug ( e . toString ( ) + System . lineSeparator ( ) + StackTrace . getStringFromStackTrace ( e ) ) ; return false ; } }
target:  This is a quiet method. Method template code from http://www.exampledepot.com/egs/java.io/DeleteDir.html