question: static void dumbDeleteRecrusive ( File file ) throws IOException { if ( file . isDirectory ( ) ) { for ( File entry : file . listFiles ( ) ) { dumbDeleteRecrusive ( entry ) ; } } if ( ! file . delete ( ) && file . exists ( ) ) { throw new IOException ( "could not delete: " + file ) ; } }
target:  Delete a directory and its contents. WARNING: Java APIs do not let us distinguish directories from symbolic links to directories. Consequently, if the directory contains symbolic links to directories, we will attempt to delete the contents of pointed-to directories.