class Puppet::FileBucket::File::FileContents
Public Class Methods
new(path)
click to toggle source
# File lib/puppet/file_bucket/file.rb 109 def initialize(path) 110 @path = path 111 end
Public Instance Methods
checksum_data(base_method)
click to toggle source
# File lib/puppet/file_bucket/file.rb 121 def checksum_data(base_method) 122 Puppet.info(_("Computing checksum on file %{path}") % { path: @path }) 123 Puppet::Util::Checksums.method(:"#{base_method}_file").call(@path) 124 end
size()
click to toggle source
# File lib/puppet/file_bucket/file.rb 117 def size 118 Puppet::FileSystem.size(@path) 119 end
stream(&block)
click to toggle source
# File lib/puppet/file_bucket/file.rb 113 def stream(&block) 114 Puppet::FileSystem.open(@path, nil, 'rb', &block) 115 end
to_binary()
click to toggle source
# File lib/puppet/file_bucket/file.rb 126 def to_binary 127 Puppet::FileSystem::binread(@path) 128 end