# File lib/sprockets/base.rb, line 66 def file_digest(path, data = nil) if stat = self.stat(path) # `data` maybe provided if data digest.update(data) # If its a file, digest the contents elsif stat.file? digest.file(path.to_s) # If its a directive, digest the list of filenames elsif stat.directory? contents = self.entries(path).join(',') digest.update(contents) end end end