aws_bucket_download | R Documentation |
Download an S3 bucket
aws_bucket_download(bucket, dest_path, ...)
bucket |
(character) bucket name. required |
dest_path |
(character) destination directory to store files. required |
... |
named parameters passed on to |
path (character) to downloaded file(s)/directory
Requires the env var AWS_REGION
. This function prompts you to make
sure that you want to delete the bucket.
Other buckets:
aws_bucket_create()
,
aws_bucket_delete()
,
aws_bucket_exists()
,
aws_bucket_list_objects()
,
aws_bucket_tree()
,
aws_bucket_upload()
,
aws_buckets()
,
six_bucket_delete()
,
six_bucket_upload()
bucket <- random_bucket()
aws_bucket_create(bucket = bucket)
desc_file <- file.path(system.file(), "DESCRIPTION")
aws_file_upload(desc_file, s3_path(bucket, "DESCRIPTION.txt"))
aws_file_upload(desc_file, s3_path(bucket, "d_file.txt"))
temp_dir <- file.path(tempdir(), bucket)
aws_bucket_download(bucket = bucket, dest_path = temp_dir)
fs::dir_ls(temp_dir)
# cleanup
six_bucket_delete(bucket, force = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.