class Puppet::FileBucket::File::FileContents

Public Class Methods

new(path) click to toggle source
    # File lib/puppet/file_bucket/file.rb
108 def initialize(path)
109   @path = path
110 end

Public Instance Methods

checksum_data(base_method) click to toggle source
    # File lib/puppet/file_bucket/file.rb
120 def checksum_data(base_method)
121   Puppet.info(_("Computing checksum on file %{path}") % { path: @path })
122   Puppet::Util::Checksums.method(:"#{base_method}_file").call(@path)
123 end
size() click to toggle source
    # File lib/puppet/file_bucket/file.rb
116 def size
117   Puppet::FileSystem.size(@path)
118 end
stream(&block) click to toggle source
    # File lib/puppet/file_bucket/file.rb
112 def stream(&block)
113   Puppet::FileSystem.open(@path, nil, 'rb', &block)
114 end
to_binary() click to toggle source
    # File lib/puppet/file_bucket/file.rb
125 def to_binary
126   Puppet::FileSystem::binread(@path)
127 end