aws_file_rename | R Documentation |
Rename remote files
aws_file_rename(remote_path, new_remote_path, ...)
remote_path |
(character) one or more remote S3 paths. required |
new_remote_path |
(character) one or more remote S3 paths. required.
length must match |
... |
named parameters passed on to |
vector of paths, length matches length(remote_path)
Other files:
aws_file_attr()
,
aws_file_copy()
,
aws_file_delete()
,
aws_file_download()
,
aws_file_exists()
,
aws_file_upload()
,
six_file_upload()
bucket <- random_bucket()
aws_bucket_create(bucket)
# rename files
tfiles <- replicate(n = 3, tempfile())
for (i in tfiles) cat("Hello\nWorld\n", file = i)
paths <- s3_path(bucket, c("aaa", "bbb", "ccc"), ext = "txt")
aws_file_upload(tfiles, paths)
new_paths <- s3_path(bucket, c("new_aaa", "new_bbb", "new_ccc"),
ext = "txt"
)
aws_file_rename(paths, new_paths)
# 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.