download_file: Download File from the Internet

View source: R/download_file.R

download_fileR Documentation

Download File from the Internet

Description

Download a file from the Internet and save to a cache directory.

Usage

download_file(url, cachedir = get_cache_dir(), ..., quiet = FALSE, mode = "wb")

Arguments

url

'character' string. URL of a resource to be downloaded.

cachedir

'character' string. Path to the cache directory, see get_cache_dir function for the default value. The file will not be downloaded if the file exists in the cache directory.

...

Additioanl arguments to be passed to the download.file function. The destination of the downloaded file may not be specified.

quiet

'logical' flag. Whether to supress status messages (if any), and the progress bar.

mode

'character' string. Mode with which to write the file. Useful values are "w", "wb" (binary), "a" (append) and "ab".

Value

Returns the path to the downloaded file, or extracted files when decompression occurs.

Author(s)

J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center


inldata documentation built on Sept. 12, 2024, 9:34 a.m.