Skip to contents

A robust and friendly downloader that supports FTP/HTTP/HTTPS sources. Automatically skips download if file already exists.

Usage

download_url(
  url,
  dest = basename(url),
  method = "auto",
  overwrite = FALSE,
  unzip = FALSE,
  verbose = TRUE
)

Arguments

url

Character. Full URL to the file (FTP or HTTP).

dest

Character. Path to save the file (default: basename(url)).

method

Character. One of "auto", "curl", "wget", or "internal". Default: "auto".

overwrite

Logical. Overwrite if file exists. Default: FALSE.

unzip

Logical. Whether to unzip after download. Default: FALSE.

verbose

Logical. Show progress messages. Default: TRUE.

Value

Invisibly returns path(s) to downloaded (and optionally unzipped) file(s).