Learn R Programming

reproducible (version 0.2.11)

cloudSyncCacheOld: Sync cloud with local Cache

Description

This is still experimental, see examples.

Usage

cloudSyncCacheOld(
  cacheRepo = getOption("reproducible.cachePath"),
  checksumsFileID = NULL,
  cloudFolderID = NULL,
  delete = TRUE,
  upload = TRUE,
  download = !delete,
  ask = getOption("reproducible.ask"),
  cacheIds = NULL,
  ...
)

Arguments

cacheRepo

See x in showCache

checksumsFileID

A google file ID where the checksums data.table is located, provided as a character string.

cloudFolderID

A googledrive id of a folder, e.g., using drive_mkdir(). If left as NULL, the function will create a cloud folder with a warning. The warning will have the cloudFolderID that should be used in subsequent calls. It will also be added to options("reproducible.cloudFolderID"), but this will not persist across sessions.

delete

Logical. If TRUE, the default, it will delete any objects that are in cloudFolderID that are absent from local cacheRepo. If FALSE, it will not delete objects.

upload

Logical. If TRUE, the default, it will upload any objects identified by the internal showCache(...) call. See examples. If FALSE, then no files will be uploaded. Can be used in conjunction with delete to create behaviours similar to clearCache and keepCache.

download

Logical. If FALSE, the default, then the function will either delete the remote copy if delete = TRUE and there is no local copy, or upload the local copy if upload = TRUE and there is a local copy. If TRUE, then this will override delete, and download to local machine if it exists remotely.

ask

Logical. If FALSE, then it will not ask to confirm deletions using clearCache or keepCache. Default is TRUE

cacheIds

If supplied, then only this/these cacheId objects will be uploaded or deleted. Default is NULL, meaning do full sync (i.e., match cloudFolder with local cacheRepo, constrained by delete or upload)

...

Passed to showCache to get the artifacts to delete.

Details

cloudSyncCacheOld will remove any entries in a cloudCache that are not in a

See Also

cloudCache, Cache, cloudWriteOld, cloudCheckOld