Class: Puppet::Settings::DirectorySetting

Inherits:
FileSetting show all
Defined in:
lib/puppet/settings/directory_setting.rb

Instance Attribute Summary

Attributes inherited from FileSetting

#create, #mode

Attributes inherited from BaseSetting

#call_hook, #default, #deprecated, #desc, #name, #section, #short

Instance Method Summary collapse

Methods inherited from FileSetting

#create_files?, #exclusive_open, #group, #group=, #initialize, #munge, #open, #owner, #owner=, #set_meta, #to_resource, #validate

Methods inherited from StringSetting

#validate

Methods inherited from BaseSetting

#allowed_on_commandline?, available_call_hook_values, #call_hook_on_define?, #call_hook_on_initialize?, #completely_deprecated?, #deprecated?, #getopt_args, #has_hook?, #hook=, #initialize, #inspect, #iscreated, #iscreated?, #munge, #optparse_args, #set_meta, #to_config, #value

Constructor Details

This class inherits a constructor from Puppet::Settings::FileSetting

Instance Method Details

#open_file(filename, 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



13
14
15
16
17
# File 'lib/puppet/settings/directory_setting.rb', line 13

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

#typeObject



2
3
4
# File 'lib/puppet/settings/directory_setting.rb', line 2

def type
  :directory
end