Method: Puppet::Network::Handler::FileServer#describe

Defined in:
lib/vendor/puppet/network/handler/fileserver.rb

#describe(url, links = :follow, client = nil, clientip = nil) ⇒ Object

Describe a given file. This returns all of the manageable aspects of that file.



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/vendor/puppet/network/handler/fileserver.rb', line 69

def describe(url, links = :follow, client = nil, clientip = nil)
  links = links.intern if links.is_a? String

  mount, path = convert(url, client, clientip)

  mount.debug("Describing #{url} for #{client}") if client

  # use the mount to resolve the path for us.
  return "" unless full_path = mount.file_path(path, client)

   = Puppet::FileServing::Metadata.new(url, :path => full_path, :links => links)

  return "" unless .exist?

  begin
    .collect
  rescue => detail
    puts detail.backtrace if Puppet[:trace]
    Puppet.err detail
    return ""
  end

  .attributes_with_tabs
end