All pastes #740877 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-10-18 09:47 UTC
rendered paste body
class Adaptor
  def initialize(clientbucket = '/var/lib/puppet/clientbucket')
    @clientbucket = clientbucket
  end
        
  def get_newest_contents_file(filename)
    Dir["#@clientbucket/**/paths"].each do |path|
      file = File.read(path).strip
      if file == filename and File.exist?(file)
        content = File.read(file)
        p file => content
      end
    end
  end
end