Retrieves a file from the project's S3 root folder and saves it to the local project folder, maintaining the original folder structure.
Arguments
- file
Path to a file relative to project folder root. Can contain only letters, digits, '-', '_', '.', spaces and '/' symbols.
- 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 thecloudfs.s3field of the project's DESCRIPTION file.
Examples
if (FALSE) { # interactive()
# downloads toy_data/demo.csv from project's S3 folder (provided it exists)
# and saves it to local 'toy_data' folder
cloud_s3_download("toy_data/demo.csv")
# clean up
unlink("toy_data", recursive = TRUE)
}