private void deleteBackups ( ) { File [ ] storeDirList = ReadOnlyUtils . getVersionDirs ( storeDir , 0L , getCurrentVersionId ( ) ) ; if ( storeDirList != null && storeDirList . length > ( numBackups + 1 ) ) { // delete ALL old directories asynchronously File [ ] extraBackups = ReadOnlyUtils . findKthVersionedDir ( storeDirList , 0 , storeDirList . length - ( numBackups + 1 ) - 1 ) ; if ( extraBackups != null ) { for ( File backUpFile : extraBackups ) { deleteAsync ( backUpFile ) ; } } } }
Delete all backups asynchronously