File attributes
Note
uses s3fs::s3_file_info()
internally
See also
Other files:
aws_file_copy()
,
aws_file_delete()
,
aws_file_download()
,
aws_file_exists()
,
aws_file_rename()
,
aws_file_upload()
,
six_file_upload()
Examples
if (FALSE) { # aws_has_creds()
library(glue)
bucket <- random_bucket()
if (!aws_bucket_exists(bucket)) {
aws_bucket_create(bucket)
}
# upload some files
tfiles <- replicate(n = 3, tempfile())
paths <- s3_path(bucket, glue("{basename(tfiles)}.txt"))
for (file in tfiles) cat("Hello saturn!!!!!!\n", file = file)
for (file in tfiles) print(readLines(file))
aws_file_upload(path = tfiles, remote_path = paths)
# files one by one
aws_file_attr(paths[1])
aws_file_attr(paths[2])
aws_file_attr(paths[3])
# or all together
aws_file_attr(paths)
# Cleanup
six_bucket_delete(bucket, force = TRUE)
}