Method: Puppet::Module#plan_file

Defined in:
lib/puppet/module.rb

#plan_file(name) ⇒ Object

This is a re-implementation of the Filetypes singular type method (e.g. ‘manifest(’my/manifest.pp’)‘. We don’t implement the full filetype “API” for plans.



192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# File 'lib/puppet/module.rb', line 192

def plan_file(name)
  # If 'file' is nil then they're asking for the base path.
  # This is used for things like fileserving.
  if name
    full_path = File.join(plans_directory, name)
  else
    full_path = plans_directory
  end

  if Puppet::FileSystem.exist?(full_path)
    return full_path
  else
    return nil
  end
end