googleCloudStorageR (version 0.4.0)

gcs_save_all: Save/Load all files in directory to Google Cloud Storage

Description

This function takes all the files in the directory, zips them, and saves/loads/deletes them to the cloud. The upload name will be the directory name.

Usage

gcs_save_all(directory = getwd(), bucket = gcs_get_global_bucket(),
  pattern = "")

gcs_load_all(directory = getwd(), bucket = gcs_get_global_bucket(), exdir = directory, list = FALSE)

gcs_delete_all(directory = getwd(), bucket = gcs_get_global_bucket())

Arguments

directory

The folder to upload/download

bucket

Bucket to store within

pattern

An optional regular expression. Only file names which match the regular expression will be saved.

exdir

When downloading, specify a destination directory if required

list

When downloading, only list where the files would unzip to

Value

When uploading the GCS meta object; when downloading TRUE if successful

Details

Zip/unzip is performed before upload and after download.

See Also

Other R session data functions: gcs_load, gcs_save_image, gcs_save, gcs_source