Function to downlod files attached to an item on SB. Either files can be
specified directly using the names
and destinations
parameters,
or a dest_dir
can be supplied where all attached files will be written
with the names as stored on SB.
Usage
item_file_download(
sb_id,
...,
names,
destinations,
dest_dir = getwd(),
overwrite_file = FALSE
)
Arguments
- sb_id
An
sbitem
object or a character ScienceBase ID corresponding to the item- ...
Additional parameters are passed on to
GET
,POST
,HEAD
,PUT
.- names
String vector list of file names attached to item that you wish to download.
- destinations
String vector list of destinations for requested files. Must be same length as
names
- dest_dir
A directory path for saving files when
names
destinations parameter is not specified.- overwrite_file
Boolean indicating if file should be overwritten if it already exists locally