question: public static boolean removeDir ( File dir ) { String [ ] list = dir . list ( ) ; if ( list != null ) { int count = list . length ; for ( int i = 0 ; i < count ; i ++ ) { String fileName = list [ i ] ; File file = new File ( dir , fileName ) ; if ( file . isDirectory ( ) ) { removeDir ( file ) ; } else if ( ! file . delete ( ) ) { Debug . log ( "FileUtils.removeDir() Unable to delete file: " + file . getAbsolutePath ( ) ) ; } } } boolean status = dir . delete ( ) ; if ( ! status ) { Debug . log ( "FileUtils.removeDir() Unable to delete directory: " + dir . getAbsolutePath ( ) ) ; } return status ; }
target:  Method removeDir. All the files in the directory will be removed