download_file: download an arbitrary file from S3

View source: R/arrow_generics.R

download_fileR Documentation

download an arbitrary file from S3

Description

Note: file must be small enough to fit in RAM with this method.

Usage

download_file(key, s3, dest = basename(key))

Arguments

key

the file name (key) to be used in the bucket (string, can include path)

s3

an arrow FileSystem object (usually S3 Filesystem)

dest

file name or connection where file should be written locally

Examples


s3 <- arrow::s3_bucket("neon4cast-forecasts", 
                       endpoint_override = "data.ecoforecast.org", 
                       anonymous=TRUE)
example <- tail(s3$ls("phenology"), 1)
dest <- tempfile()
download_file(example, s3, dest)


eco4cast/read4cast documentation built on Nov. 7, 2023, 5:12 a.m.