method

checksum_for_file

ruby latest stable - Class: Bundler::CompactIndexClient::Updater

Method not available on this version

This method is only available on newer versions. The first available version (v2_6_3) is shown here.

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