resumableDownload {taxonomizr}R Documentation

Download file using curl allowing resumption of interrupted files

Description

A helper function that uses the curl package's multi_download to download a file using a temporary file to store progress and resume downloading on interruption.

Usage

resumableDownload(
  url,
  outFile = basename(url),
  tmpFile = sprintf("%s.__TMP__", outFile),
  quiet = FALSE,
  resume = TRUE,
  ...
)

Arguments

url

The address to download from

outFile

The file location to store final download at

tmpFile

The file location to store the intermediate download at

quiet

If TRUE show the progress reported by multi_download

resume

If TRUE try to resume interrupted downloads using intermediate file tmpFile. Otherwise delete tempFile on error

...

Additional arguments to multi_download

Value

invisibly return the output from multi_download

See Also

multi_download

Examples

## Not run: 
  url<-'https://ftp.ncbi.nih.gov/pub/taxonomy/accession2taxid/prot.accession2taxid.FULL.1.gz'
  resumableDownload(url,'downloadedFile.gz')

## End(Not run)

[Package taxonomizr version 0.10.6 Index]