Module: S33r::Sync
- Defined in:
- lib/s33r/sync.rb
Overview
Woefully incomplete module for performing sync operations. Aim is to enable s33r to compare files on the filesystem to S3 objects.
Instance Method Summary collapse
-
#md5sum(filename) ⇒ Object
Get the MD5 checksum for a file (comparable to the ETag on S3 objects).
Instance Method Details
#md5sum(filename) ⇒ Object
Get the MD5 checksum for a file (comparable to the ETag on S3 objects).
7 8 9 10 |
# File 'lib/s33r/sync.rb', line 7 def md5sum(filename) f = File.open(filename).binmode OpenSSL::Digest::MD5.hexdigest(f.read) end |