curlProgress: curlProgress

View source: R/curlProgress.R

curlProgressR Documentation

curlProgress

Description

Download a binary file from remote to local, with progress monitor

Usage

curlProgress(url, fname, mode = "wb", width_fx = 0.8)

Arguments

url

A remote URL

fname

The local destination, including the file name and extension

mode

Mode, as in RCurl::CFILE. Read, Write; Text, Binary. Defaults to 'wb' (write binary)

width_fx

(Optional) The console output message width; defaults to 0.8

Details

This is unabashedly taken from https://stackoverflow.com/a/21961094, and all credit is due. Minor additional input checks.

Value

The requested asset

See Also

ftp_getBinPars for creating FTP parameters to pass to this function.

Examples

## Not run: 
# ftp example
curlProgress(
  url = "ftp://user:pwd@.xyz.com/dir/myfile.zip",
  fname = "./local_dir/myfile.zip"
)

## End(Not run)

slin30/wzMisc documentation built on Jan. 27, 2023, 1 a.m.