static void cleanLegacyChecksums(Directory directory,long newVersion) throws IOException {
synchronized (directory) {
    for (    String name : directory.listAll()) {
      if (isChecksum(name)) {
        long current=Long.parseLong(name.substring(CHECKSUMS_PREFIX.length()));
        if (current < newVersion) {
          try {
            directory.deleteFile(name);
          }
 catch (          IOException ex) {
            logger.debug("can't delete old checksum file [{}]",ex,name);
          }
        }
      }
    }
  }
}

static void cleanLegacyChecksums ( Directory directory , long newVersion ) throws IOException { synchronized ( directory ) { for ( String name : directory . listAll ( ) ) { if ( isChecksum ( name ) ) { long current = Long . parseLong ( name . substring ( CHECKSUMS_PREFIX . length ( ) ) ) ; if ( current < newVersion ) { try { directory . deleteFile ( name ) ; } catch ( IOException ex ) { logger . debug ( "can't delete old checksum file [{}]" , ex , name ) ; } } } } } }
deletes all checksum files with version lower than newversion .
