download_zip_to_folder {saros.base} | R Documentation |
Wrapper to Download and Unzip a Github Repository to A Folder
Description
Wrapper to Download and Unzip a Github Repository to A Folder
Usage
download_zip_to_folder(
github_zip_url = "https://github.com/NIFU-NO/nifutemplates/archive/refs/heads/main.zip",
zip_path = tempfile(fileext = ".zip"),
files = NULL,
out_path,
prompt = TRUE,
overwrite = FALSE,
open_project = FALSE,
newSession = TRUE
)
Arguments
github_zip_url |
URL to zip file, as string. |
zip_path |
String, where to store zip-file. Defaults to a temporary location. |
files |
Character vector of files in zip-file to include. See |
out_path |
String, directory to where to store the unzipped files. |
prompt |
Flag, whether to ask user if conflicting files should be overwritten, if any. Defaults to TRUE. |
overwrite |
Flag, whether to overwrite files in out_path. Defaults to FALSE. |
open_project |
Flag or string. If FALSE (default), does nothing. If TRUE (requires |
newSession |
Flag. Whether to open new project in a new RStudio session. Defaults to TRUE. |
Value
Character vector of unzipped files.
Examples
download_zip_to_folder(
github_zip_url = "https://github.com/NIFU-NO/nifutemplates/archive/refs/heads/main.zip",
out_path = tempdir(), overwrite = TRUE
)