download_cloud_file: Download an object from a cloud storage bucket to a local...

View source: R/cloud-storage.R

download_cloud_fileR Documentation

Download an object from a cloud storage bucket to a local file

Description

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
## Not run: 
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"
  )
)

## End(Not run)

WorldFishCenter/peskas.timor.data.pipeline documentation built on April 14, 2025, 1:47 p.m.