lib/zipr/archive.rb
#
# Description:
#   Writes the archive's checksum file.
# Returns:
#   A hash of all known checksums for the archive.
Writes the archive's checksum file.
Returns:
A hash of all known checksums for the archive.
Writes the archive ' s checksum file . Returns : A hash of all known checksums for the archive .
def update_checksum_file
      archive_path = @options[:sfx] ? @sfx_path : @path
      archive_checksum = ::Digest::SHA256.file(archive_path).hexdigest
      @checksums['archive_checksum'] = archive_checksum
      @checksum_path = "#{@cache_path}/checksums/#{::File.basename(archive_path)}-#{archive_checksum}.txt"
      FileUtils.mkdir_p(::File.dirname(checksum_path)) unless ::File.directory?(::File.dirname(checksum_path))
      ::File.write(checksum_path, @checksums.to_json)
      @checksums
    end
def update_checksum_file archive_path = @options [ :sfx ] ? @sfx_path : @path archive_checksum = :: Digest :: SHA256 . file ( archive_path ) . hexdigest @checksums [ 'archive_checksum' ] = archive_checksum @checksum_path = "#{@cache_path}/checksums/#{::File.basename(archive_path)}-#{archive_checksum}.txt" FileUtils . mkdir_p ( :: File . dirname ( checksum_path ) ) unless :: File . directory? ( :: File . dirname ( checksum_path ) ) :: File . write ( checksum_path , @checksums . to_json ) @checksums end
Description:
Writes the archive's checksum file.
Description : Writes the archive ' s checksum file .