Learn R Programming

reproducible (version 1.1.1)

cloudDownload: Download from cloud, if necessary

Description

Meant for internal use, as there are internal objects as arguments.

Usage

cloudDownload(
  outputHash,
  newFileName,
  gdriveLs,
  cacheRepo,
  cloudFolderID,
  drv = getOption("reproducible.drv", RSQLite::SQLite()),
  conn = getOption("reproducible.conn", NULL)
)

Arguments

outputHash

The cacheId of the object to upload

newFileName

The character string of the local filename that the downloaded object will have

gdriveLs

The result of googledrive::drive_ls(as_id(cloudFolderID), pattern = "outputHash")

cacheRepo

A repository used for storing cached objects. This is optional if Cache is used inside a SpaDES module.

cloudFolderID

A googledrive dribble of a folder, e.g., using drive_mkdir(). If left as NULL, the function will create a cloud folder with name from last two folder levels of the cacheRepo path, : paste0(basename(dirname(cacheRepo)), "_", basename(cacheRepo)). This cloudFolderID will be added to options("reproducible.cloudFolderID"), but this will not persist across sessions. If this is a character string, it will treat this as a folder name to create or use on GoogleDrive.

drv

an object that inherits from '>DBIDriver, or an existing '>DBIConnection object (in order to clone an existing connection).

conn

A '>DBIConnection object, as returned by dbConnect().