question: public static void delete ( File folder ) { if ( folder . isDirectory ( ) ) { File [ ] contents = folder . listFiles ( ) ; for ( File file : contents ) { FileUtils . delete ( file ) ; } folder . delete ( ) ; } else { folder . delete ( ) ; } }
target:  Cleans a given file. If the file is a directory, it first cleans all its contained files (or folders).