Description Usage Arguments Value References Examples
View source: R/drop_download.R
Download a file from Dropbox to disk.
1 2 3 4 5 6 7 8 | drop_download(
path,
local_path = NULL,
overwrite = FALSE,
progress = interactive(),
verbose = interactive(),
dtoken = get_dropbox_token()
)
|
path |
path to a file in Dropbox |
local_path |
path to save file to. If NULL (the default), saves file to working directory with same name. If not null, but a valid folder, file will be saved in this folder with same basename as path. If not null and not a folder, file will be saved to this path exactly. |
overwrite |
If TRUE, overwrite local file. Defaults to FALSE |
progress |
If TRUE, show a progress bar for large file downloads. Defaults to TRUE in interactive sessions, otherwise FALSE. |
verbose |
if TRUE, emit message giving location and size of the newly downloaded file. Defaults to TRUE in interactive sessions, otherwise FALSE. |
dtoken |
The Dropbox token generated by |
TRUE if successful; error thrown otherwise.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
# download a file to the current working directory
drop_get("dataset.zip")
# download again, overwriting previous result
drop_get("dataset.zip", overwrite = TRUE)
# download to a different path, keeping file name constant
# will download to "some/other/place/dataset.zip"
drop_get("dataset.zip", local_path = "some/other/place/")
# download to to a different path, changing filename
drop_get("dataset.zip", local_path = "some/other/place/not_a_dataset.zip")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.