Class: Cfruby::Checksum::ChecksumValues

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/libcfruby/checksum.rb

Overview

Returned by get_checksums. The checksum contains the following fields:

uid

User id of the file’s owner

gid

Group id of the file’s group

permissions

Integer representation of the file’s permissions

md5

MD5 hash of the file’s contents

sha1

SHA1 hash of the file’s contents

timestamp

The modification time of the file

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object



52
53
54
55
56
57
58
59
60
61
62
# File 'lib/libcfruby/checksum.rb', line 52

def ==(other)
	self.each_key?() { |key|
		if(!other.has_key?(key))
			return(false)
		elsif(self[key] != other[key])
			return(false)
		end
	}
	
	return(true)
end