gcs_save_all {googleCloudStorageR} | R Documentation |
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 = "",
predefinedAcl = c("private", "bucketLevel", "authenticatedRead",
"bucketOwnerFullControl", "bucketOwnerRead", "projectPrivate", "publicRead",
"default")
)
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. |
predefinedAcl |
Specify user access to object. Default is 'private'. Set to 'bucketLevel' for buckets with bucket level access enabled. |
exdir |
When downloading, specify a destination directory if required |
list |
When downloading, only list where the files would unzip to |
Details
Zip/unzip is performed before upload and after download using zip.
Value
When uploading the GCS meta object; when downloading TRUE
if successful
See Also
Other R session data functions:
gcs_load()
,
gcs_save_image()
,
gcs_save()
,
gcs_source()
Examples
## Not run:
gcs_save_all(
directory = "path-to-all-images",
bucket = "my-bucket",
predefinedAcl = "bucketLevel")
## End(Not run)