lib/fig/protocol/file.rb
# Returns whether the file was not downloaded because the file already
# exists and is already up-to-date.
Returns whether the file was not downloaded because the file already
exists and is already up-to-date.
Returns whether the file was not downloaded because the file already exists and is already up - to - date .
def download(uri, path, prompt_for_login)
    begin
      unescaped_path = CGI.unescape uri.path
      FileUtils.cp(unescaped_path, path)
      return true
    rescue Errno::ENOENT => error
      raise Fig::FileNotFoundError.new error.message, uri
    end
  end
def download ( uri , path , prompt_for_login ) begin unescaped_path = CGI . unescape uri . path FileUtils . cp ( unescaped_path , path ) return true rescue Errno :: ENOENT => error raise Fig :: FileNotFoundError . new error . message , uri end end
Returns whether the file was not downloaded because the file already
exists and is already up-to-date.
Returns whether the file was not downloaded because the file already exists and is already up - to - date .
uri
path
prompt_for_login