question: public static boolean deleteDirectoryRecursively ( File directory ) { if ( ! directory . exists ( ) || ! directory . isDirectory ( ) ) { return false ; } for ( File entry : directory . listFiles ( ) ) { if ( entry . isDirectory ( ) ) { deleteDirectoryRecursively ( entry ) ; } if ( ! entry . delete ( ) ) { return false ; } } return directory . delete ( ) ; }
target:  Deletes the given directory and all it's contents, including sub-directories.