@Nullable public static String directoryMd5(@Nullable File dir,@Nullable IgniteLogger log){
  if (dir != null) {
    if (!dir.isDirectory()) {
      U.warn(log,"Failed to find directory for md5 calculation: " + dir);
      return null;
    }
    try {
      MessageDigest digest=MessageDigest.getInstance("MD5");
      return addDirectoryDigest(dir,digest,log) ? Hex.encodeHexString(digest.digest()) : null;
    }
 catch (    NoSuchAlgorithmException e) {
      throw new IgniteException("MD5 digest algorithm not found.",e);
    }
  }
  return null;
}

@ Nullable public static String directoryMd5 ( @ Nullable File dir , @ Nullable IgniteLogger log ) { if ( dir != null ) { if ( ! dir . isDirectory ( ) ) { U . warn ( log , "Failed to find directory for md5 calculation: " + dir ) ; return null ; } try { MessageDigest digest = MessageDigest . getInstance ( "MD5" ) ; return addDirectoryDigest ( dir , digest , log ) ? Hex . encodeHexString ( digest . digest ( ) ) : null ; } catch ( NoSuchAlgorithmException e ) { throw new IgniteException ( "MD5 digest algorithm not found." , e ) ; } } return null ; }
for directories tries to walk all nested files accumulating them into single md5 checksum .
