private void cleanDirectory ( File dir ) { if ( isVerbose ( ) || getLog ( ) . isDebugEnabled ( ) ) { getLog ( ) . info ( "Deleting previously generated files in directory: " + dir . getPath ( ) ) ; } if ( dir . exists ( ) ) { try { FileUtils . cleanDirectory ( dir ) ; } catch ( IOException e ) { getLog ( ) . warn ( "Cleaning directory failed: " + e . getMessage ( ) ) ; } } }
Deletes all files within the given directory .