inst/example/example1.R

library(googleCloudStorageR)
options(googleAuthR.scopes.selected = "https://www.googleapis.com/auth/devstorage.full_control")
googleAuthR::gar_auth()

proj <- "your-project"
bucket <- "your-bucket"

buckets <- gcs_list_buckets(proj)
bucket_info <- gcs_get_bucket(bucket)

objects <- gcs_list_objects(bucket)

gcs_get_object(bucket, objects$name[[1]], saveToDisk = "csv_downloaded.csv")
MarkEdmondson1234/googleCloudStorageR documentation built on April 27, 2021, 11:41 a.m.