Methods

Class/Module Index [+]

Quicksearch

Pkg::Util::Net

Utility methods for handling network calls and interactions

Public Class Methods

fetch_uri(uri, target) click to toggle source

This simple method does an HTTP get of a URI and writes it to a file in a slightly more platform agnostic way than curl/wget

# File ext/packaging/lib/packaging/util/net.rb, line 9
def fetch_uri(uri, target)
  require 'open-uri'
  if Pkg::Util::File.file_writable?(File.dirname(target))
    File.open(target, 'w') { |f| f.puts( open(uri).read ) }
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.