Skip to contents

Download object from the cloud storage to a local file

Usage

download_cloud_file(name, provider, options, file = name)

Arguments

name

the name of the object in the storage bucket.

provider

cloud provider to use, either "gcs" or "aws"

options

named list with cloud provider options, see details

file

a file-path (character) where the object will be saved. Default is the object name.

Value

the file path

Examples


# Google Cloud Services
if (FALSE) { # \dontrun{
authentication_details <- readLines("location_of_json_file.json")
download_cloud_file(
  name = "timor-landings-v2_metadata__20210326084600_54617b3__.json",
  provider = "gcs",
  options = list(
    service_account_key = authentication_details,
    bucket = "my-bucket"
  )
)
} # }