Skip to content

Every object whose key starts with prefix, across all pages of the listing. Reading a bucket's manifest (metadata.json, manifest.json) is usually faster than listing it, when the publisher writes one last: it says what is there, and it is there only when everything else is.

Usage

list_s3(prefix = NULL, bucket = NULL, delimiter = NULL, config = s3_config())

Arguments

prefix

Key prefix, "" or NULL for the whole bucket, or an s3://bucket/prefix URL.

bucket

Bucket; defaults to the config's bucket.

delimiter

NULL lists every object under the prefix. "/" lists one level: the objects directly under the prefix and the common prefixes ("folders") below it, which come back as rows whose key ends with the delimiter and whose size, last_modified and etag are NA.

config

An s3_config().

Value

A tibble with one row per object: key, size (bytes), last_modified (UTC) and etag. Zero rows when nothing matches.

Examples

if (FALSE) { # interactive()
list_s3("data/", bucket = "my-bucket")
list_s3("s3://my-bucket/series/")
list_s3("series/", bucket = "my-bucket", delimiter = "/")   # one level
}