Skip to contents

Downloads multiple files from an S3 folder based on the output dataframe from cloud_s3_ls. This function streamlines the process of downloading multiple files by allowing you to filter and select specific files from the S3 listing and then download them in bulk.

Usage

cloud_s3_download_bulk(content, quiet = FALSE, root = NULL)

Arguments

content

(data.frame) Output of cloud_s3_ls()

quiet

All caution messages may be turned off by setting this parameter to TRUE.

root

S3 path of the project root. This serves as the reference point for all relative paths. When left as NULL, the root is automatically derived from the cloudfs.s3 field of the project's DESCRIPTION file.

Value

Invisibly returns the input content dataframe.

Examples

if (FALSE) { # interactive()
# provided there's a folder called "toy_data" in the root of your project's
# S3 folder, and this folder contains "csv" files
cloud_s3_ls("toy_data") |> 
  filter(type == "csv") |> 
  cloud_s3_download_bulk()
  
# clean up
unlink("toy_data", recursive = TRUE)
  
}