public static boolean tryDeleteFileOrDirectory ( File file ) { try { deleteFileOrDirectory ( file ) ; return true ; } catch ( Exception e ) { logger . warn ( "Failed to delete file. file = " + file . getAbsolutePath ( ) , e ) ; return false ; } }
Try to delete File or Directory