save_data(original_checksum, original_file_size, file) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/pstore.rb, line 435
  def save_data(original_checksum, original_file_size, file)
    new_data = dump(@table)

    if new_data.bytesize != original_file_size || CHECKSUM_ALGO.digest(new_data) != original_checksum
      if @ultra_safe && !on_windows?
        # Windows doesn't support atomic file renames.
        save_data_with_atomic_file_rename_strategy(new_data, file)
      else
        save_data_with_fast_strategy(new_data, file)
      end
    end

    new_data.replace(EMPTY_STRING)
  end
Register or log in to add new notes.