Sha256: d6b2569b2a8b55d8150a7c5a3baee0c6f9d1063f86e2a346c7101cd11d73b79f

Contents?: true

Size: 376 Bytes

Versions: 4

Compression:

Stored size: 376 Bytes

Contents

module S33r
  # Woefully incomplete module for performing sync operations.
  # Aim is to enable s33r to compare files on the filesystem to S3 objects.
  module Sync

    # Get the MD5 checksum for a local file (comparable to the ETag on S3 objects).
    def md5sum(filename)
      f = File.open(filename).binmode
      OpenSSL::Digest::MD5.hexdigest(f.read)
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
s33r-0.4.2 lib/s33r/sync.rb
s33r-0.4.1 lib/s33r/sync.rb
s33r-0.4 lib/s33r/sync.rb
s33r-0.3.1 lib/s33r/sync.rb