Download data from an existing release
Usage
pb_download(
file = NULL,
dest = ".",
repo = guess_repo(),
tag = "latest",
overwrite = TRUE,
ignore = "manifest.json",
use_timestamps = TRUE,
show_progress = getOption("piggyback.verbose", default = interactive()),
.token = gh::gh_token()
)
Arguments
- file
name or vector of names of files to be downloaded. If
NULL
, all assets attached to the release will be downloaded.- dest
name of vector of names of where file should be downloaded. Can be a directory or a list of filenames the same length as
file
vector. Any directories in the path provided must already exist.- repo
Repository name in format "owner/repo". Defaults to
guess_repo()
.- tag
tag for the GitHub release to which this data should be attached.
- overwrite
Should any local files of the same name be overwritten? default
TRUE
.- ignore
a list of files to ignore (if downloading "all" because
file=NULL
).- use_timestamps
DEPRECATED.
- show_progress
logical, show a progress bar be shown for uploading? Defaults to
[interactive()]
- can also set globally with options("piggyback.verbose")- .token
GitHub authentication token, see
[gh::gh_token()]
Examples
if (FALSE) {
## Download a specific file.
## (dest can be omitted when run inside and R project)
piggyback::pb_download("iris.tsv.gz",
repo = "cboettig/piggyback-tests",
dest = tempdir())
}
if (FALSE) {
## Download all files
piggyback::pb_download(repo = "cboettig/piggyback-tests",
dest = tempdir())
}