private void deleteExecutorDirs ( String [ ] dirs ) { for ( String localDir : dirs ) { try { JavaUtils . deleteRecursively ( new File ( localDir ) ) ; logger . debug ( "Successfully cleaned up directory: {}" , localDir ) ; } catch ( Exception e ) { logger . error ( "Failed to delete directory: " + localDir , e ) ; } } }
Synchronously deletes each directory one at a time . Should be executed in its own thread as this may take a long time .