class Puppet::FileBucket::File::FileContents

Public Instance Methods

checksum_data(base_method) click to toggle source
# File lib/puppet/file_bucket/file.rb, line 148
def checksum_data(base_method)
  Puppet.info("Computing checksum on file #{@path}")
  Puppet::Util::Checksums.method(:"#{base_method}_file").call(@path)
end
size() click to toggle source
# File lib/puppet/file_bucket/file.rb, line 144
def size
  Puppet::FileSystem.size(@path)
end
stream(&block) click to toggle source
# File lib/puppet/file_bucket/file.rb, line 140
def stream(&block)
  Puppet::FileSystem.open(@path, nil, 'rb', &block)
end
to_s() click to toggle source
# File lib/puppet/file_bucket/file.rb, line 153
def to_s
  Puppet::FileSystem::binread(@path)
end

Public Class Methods

new(path) click to toggle source
# File lib/puppet/file_bucket/file.rb, line 136
def initialize(path)
  @path = path
end