Sha256: 6a1f65ba5621b361ebcfb914bb727602156d12d257a7837f0efa1ffb39b3e9e6
Contents?: true
Size: 796 Bytes
Versions: 5
Compression:
Stored size: 796 Bytes
Contents
# # Created by Luke Kanies on 2007-10-24. # Copyright (c) 2007. All rights reserved. require 'puppet/file_serving/terminus_helper' require 'puppet/util/uri_helper' require 'puppet/indirector/terminus' class Puppet::Indirector::DirectFileServer < Puppet::Indirector::Terminus include Puppet::Util::URIHelper include Puppet::FileServing::TerminusHelper def find(key, options = {}) uri = key2uri(key) return nil unless FileTest.exists?(uri.path) instance = model.new(key, :path => uri.path) instance.links = options[:links] if options[:links] return instance end def search(key, options = {}) uri = key2uri(key) return nil unless FileTest.exists?(uri.path) path2instances(key, uri.path, options) end end
Version data entries
5 entries across 5 versions & 1 rubygems