# File lib/puppet/provider/service/daemontools.rb, line 66 66: def self.instances 67: path = self.defpath 68: unless FileTest.directory?(path) 69: Puppet.notice "Service path %s does not exist" % path 70: next 71: end 72: 73: # reject entries that aren't either a directory 74: # or don't contain a run file 75: Dir.entries(path).reject { |e| 76: fullpath = File.join(path, e) 77: e =~ /^\./ or ! FileTest.directory?(fullpath) or ! FileTest.exist?(File.join(fullpath,"run")) 78: }.collect do |name| 79: new(:name => name, :path => path) 80: end 81: end