private static void deleteUserDirectories ( final File root , final FileFilter filter ) { final File [ ] dirs = root . listFiles ( filter ) ; LOGGER . info ( "Identified (" + dirs . length + ") directories to delete" ) ; for ( final File dir : dirs ) { LOGGER . info ( "Deleting " + dir ) ; if ( ! FileUtils . deleteQuietly ( dir ) ) { LOGGER . info ( "Failed to delete directory " + dir ) ; } } }
Deletes all of the Directories in root that match the FileFilter