Methods

Class/Module Index [+]

Quicksearch

Nanoc::PathnameExtensions

Public Instance Methods

checksum() click to toggle source

Calculates the checksum for the file referenced to by this pathname. Any change to the file contents will result in a different checksum.

@return [String] The checksum for this file

@api private

# File lib/nanoc/base/core_ext/pathname.rb, line 10
def checksum
  stat = File.stat(self.to_s)
  stat.size.to_s + '-' + stat.mtime.to_s
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.