rlib/aws_connection.rb
def obj_md5(key:)
    begin
      @resp = @s3_client.head_object(bucket: @bucket, key: key)
      return resp.etag.gsub(/"/, '')
    rescue Aws::S3::Errors::NotFound => _e
      return nil
    rescue   StandardError => e
      $stderr.puts "obj_md5(#{@bucket}) : #{e.class} #{e}"
    end
  end
# Fetch the object's header's md5 value (nil if no object)
# @param key [String] Object reference (bucket is already known)
# @return md5 [String] MD5 checksum as a hexstring (Mac/FreeBSD equivalent is /sbin/md5. Linux equivalent is /usr/bin/md5sum)
Fetch the object's header's md5 value (nil if no object)
Fetch the object ' s header ' s md5 value ( nil if no object )
def obj_md5(key:)
    begin
      @resp = @s3_client.head_object(bucket: @bucket, key: key)
      return resp.etag.gsub(/"/, '')
    rescue Aws::S3::Errors::NotFound => _e
      return nil
    rescue   StandardError => e
      $stderr.puts "obj_md5(#{@bucket}) : #{e.class} #{e}"
    end
  end
def obj_md5 ( key : ) begin @resp = @s3_client . head_object ( bucket : @bucket , key : key ) return resp . etag . gsub ( / " / , '' ) rescue Aws :: S3 :: Errors :: NotFound => _e return nil rescue StandardError => e $stderr . puts "obj_md5(#{@bucket}) : #{e.class} #{e}" end end
Fetch the object's header's md5 value (nil if no object)
Fetch the object ' s header ' s md5 value ( nil if no object )
md5  MD5 checksum as a hexstring (Mac/FreeBSD equivalent is /sbin/md5. Linux equivalent is /usr/bin/md5sum)
md5 MD5 checksum as a hexstring ( Mac / FreeBSD equivalent is / sbin / md5 . Linux equivalent is / usr / bin / md5sum )
String
key
Object reference (bucket is already known)
Object reference ( bucket is already known )