Method: Puppet::Settings::FileSetting#open

Defined in:
lib/puppet/settings/file_setting.rb

#open(option = 'r', &block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • option (String) (defaults to: 'r')

    Extra file operation mode information to use (defaults to read-only mode ‘r’) This is the standard mechanism Ruby uses in the IO class, and therefore encoding may be explicitly like fmode : encoding or fmode : “BOM|UTF-*” for example, a:ASCII or w+:UTF-8



201
202
203
204
205
# File 'lib/puppet/settings/file_setting.rb', line 201

def open(option = 'r', &block)
  controlled_access do |mode|
    Puppet::FileSystem.open(file, mode, option, &block)
  end
end