View source: R/item_file_download.R
item_file_download | R Documentation |
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.
item_file_download(
sb_id,
...,
names,
destinations,
dest_dir = getwd(),
overwrite_file = FALSE
)
sb_id |
An |
... |
Additional parameters are passed on to |
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 |
dest_dir |
A directory path for saving files when |
overwrite_file |
Boolean indicating if file should be overwritten if it already exists locally |
Character vector of full paths to local files
## Not run:
#downloads all files attached to this item
item_file_download('627f1572d34e3bef0c9a30d8', dest_dir=tempdir())
#downloads a specific file attached to this item
item_file_download('627f1572d34e3bef0c9a30d8', names='example.txt',
destinations=file.path(tempdir(), 'out.txt'))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.