Skip to content

Does an object exist?

Usage

exists_s3(key, bucket = NULL, config = s3_config())

Arguments

key

Object key inside bucket, or an s3://bucket/key URL.

bucket

Bucket; defaults to the config's bucket (S3PE_BUCKET).

config

An s3_config().

Value

TRUE or FALSE. Anything but a plain "not found" (no credentials, access denied, server down) is an error.

Examples

if (FALSE) { # interactive()
exists_s3("data/manifest.json", bucket = "my-bucket")
}