Uploads a local file from the project's directory to its corresponding location within the project's S3 root folder.
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.s3
field of the project's DESCRIPTION file.
Examples
if (FALSE) { # interactive()
# create a toy csv file
dir.create("toy_data")
write.csv(mtcars, "toy_data/mtcars.csv")
# uploads toy_data/mtcars.csv to 'data' subfolder of project's S3 folder
cloud_s3_upload("toy_data/mtcars.csv")
# clean up
unlink("toy_data", recursive = TRUE)
}