Download a file
Arguments
- remote_path
(character) one or more remote S3 paths. required
- path
(character) one or more file paths to write to. required
- ...
named parameters passed on to
s3fs::s3_file_download()
See also
Other files:
aws_file_attr()
,
aws_file_copy()
,
aws_file_delete()
,
aws_file_exists()
,
aws_file_rename()
,
aws_file_upload()
,
six_file_upload()
Examples
if (FALSE) { # \dontrun{
tfile <- tempfile()
aws_file_download(remote_path = "s3://s64-test-2/DESCRIPTION", path = tfile)
# many files
tfiles <- replicate(n = 3, tempfile())
aws_file_download(
remote_path =
s3_path("s64-test-2", c("a_file", "c_file", "d_file")), path = tfiles
)
## length of `remote_path` and `path` must be the same
tfiles <- replicate(n = 2, tempfile())
aws_file_download(
remote_path =
s3_path("s64-test-2", c("a_file", "c_file", "d_file")), path = tfiles
)
# S3 file does not exist
temp_path <- tempfile()
aws_file_download(s3_path("s64-test-2", "TESTING123"), temp_path)
} # }