method
checksum_for_file
ruby latest stable - Class:
Bundler::CompactIndexClient::Updater
checksum_for_file(path)public
No documentation available.
# File lib/bundler/compact_index_client/updater.rb, line 105
def checksum_for_file(path)
return nil unless path.file?
# This must use IO.read instead of Digest.file().hexdigest
# because we need to preserve \n line endings on windows when calculating
# the checksum
SharedHelpers.filesystem_access(path, :read) do
SharedHelpers.digest(:MD5).hexdigest(IO.read(path))
end
end