# File lib/puppet/indirector/file.rb, line 48
48:   def find(request)
49:     return nil unless path = latest_path(request)
50:     format = file_format(path)
51: 
52:     raise ArgumentError, "File format #{format} is not supported by #{self.class.indirection_name}" unless model.support_format?(format)
53: 
54:     begin
55:       return model.convert_from(format, File.read(path))
56:     rescue => detail
57:       raise Puppet::Error, "Could not convert path #{path} into a #{self.class.indirection_name}: #{detail}"
58:     end
59:   end