# File lib/puppet/module/tool/cache.rb, line 19
    def retrieve(url)
      returning(path + File.basename(url.to_s)) do |cached_file|
        uri = normalize(url)
        unless cached_file.file?
          if uri.scheme == 'file'
            FileUtils.cp(uri.path, cached_file)
          else
            # TODO: Handle HTTPS; probably should use repository.contact
            data = read_retrieve(uri)
            cached_file.open('wb') { |f| f.write data }
          end
        end
      end
    end