rip: Polite file download

Description Usage Arguments Value Examples

View source: R/rip.R

Description

Polite file download

Usage

1
2
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

1
2
3
bow("https://www.cheese.com/") %>%
 nod("media/img/sub-page-slide2.jpg") %>%
 rip()

polite documentation built on Dec. 1, 2019, 1:10 a.m.