# File lib/puppet/parser/files.rb, line 36
36:   def find_template(template, environment = nil)
37:     if template == File.expand_path(template)
38:       return template
39:     end
40: 
41:     if template_paths = templatepath(environment)
42:       # If we can find the template in :templatedir, we return that.
43:       template_paths.collect { |path|
44:         File::join(path, template)
45:       }.each do |f|
46:         return f if FileTest.exist?(f)
47:       end
48:     end
49: 
50:     # check in the default template dir, if there is one
51:     if td_file = find_template_in_module(template, environment)
52:       return td_file
53:     end
54: 
55:     nil
56:   end