rip: Polite file download

View source: R/rip.R

ripR Documentation

Polite file download

Description

Polite file download

Usage

rip(
  bow,
  destfile = NULL,
  ...,
  mode = "wb",
  path = tempdir(),
  overwrite = FALSE
)

Arguments

bow

host introduction object of class polite, session created by bow() or nod()

destfile

optional new file name to use when saving the file. If missing, it will be guessed from 'basename(url)“

...

other parameters passed to download.file

mode

character. The mode with which to write the file. Useful values are w, wb (binary), a (append) and ab. Not used for methods wget and curl.

path

character. Path where to save the destfile. By default is temporary directory created with tempdir() Ignored if destfile contains path along with filename.

overwrite

if TRUE will overwrite file on disk

Value

Full path to the locally saved file indicated by the user in destfile (and path)

Examples


bow("https://en.wikipedia.org/") %>%
 nod("wiki/Flag_of_the_United_States#/media/File:Flag_of_the_United_States.svg") %>%
 rip()


polite documentation built on July 9, 2023, 5:21 p.m.