class Pathname
Public Instance Methods
file_crc32()
click to toggle source
Returns the CRC32 checksum (in hexadecimal format) of the contents of the file indicated by the Pathname
.
@return [String]
# File lib/gorge/pathname.rb, line 9 def file_crc32 Digest::CRC32.file(self).hexdigest end
file_md5()
click to toggle source
Returns the MD5 hash (in hexadecimal format) of the contents of the file indicated by the Pathname
.
@return [String]
# File lib/gorge/pathname.rb, line 17 def file_md5 Digest::MD5.file(self).hexdigest end
file_sha1()
click to toggle source
Returns the SHA1 hash (in hexadecimal format) of the contents of the file indicated by the Pathname
.
@return [String]
# File lib/gorge/pathname.rb, line 25 def file_sha1 Digest::SHA1.file(self).hexdigest end
file_sha256()
click to toggle source
Returns the SHA256 hash (in hexadecimal format) of the contents of the file indicated by the Pathname
.
@return [String]
# File lib/gorge/pathname.rb, line 33 def file_sha256 Digest::SHA256.file(self).hexdigest end