This is still experimental, see examples.

cloudSyncCache(cacheRepo = getOption("reproducible.cachePath")[1],
  checksumsFileID = NULL, cloudFolderID = NULL, delete = TRUE, ...)

Arguments

cacheRepo

See x in showCache

checksumsFileID

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

cloudFolderID

The google folder ID where a new checksums file should be written. This will only be used if checksumsFileID is not provided provided as a character string.

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.

...

Arguments of FUN function .

Details

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

See also

Examples

# NOT RUN {
  #make a google drive folder
  library(googledrive)
  newDir <- drive_mkdir("testFolder")
  a <- Cache(rnorm, 1)
  b <- Cache(rnorm, 2)

  # Will copy the 2 to the cloud
  cloudSyncCache(cloudFolderID = newDir$id)

  # remove a local one
  clearCache(userTags = CacheDigest(list(rnorm, 2))$outputHash, ask = FALSE)

  # Now will delete the object in the cloud that was just deleted locally
  cloudSyncCache(cloudFolderID = newDir$id)

  # clean up
  clearCache(ask = FALSE)
  cloudSyncCache(cloudFolderID = newDir$id)

  # To remove whole folder:
  drive_rm(as_id(newDir$id))
# }