s3_object_exists: Check if object exists in cloud

View source: R/s3.R

s3_object_existsR Documentation

Check if object exists in cloud

Description

Check if object exists in cloud

Usage

s3_object_exists(s3_url, conf = list(), quiet = FALSE, ...)

Arguments

s3_url

string S3 URL to check. Needs to include the bucket and protocol (s3://bucket_name/)

conf

list with 'key', 'secret', 'region', and 'base_url' parameters. If missing, will look for AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_DEFAULT_REGION in environment variables.

quiet

logical turn off output messages, default to FALSE

...

additional arguments passed to

Value

TRUE or FALSE depending on whether the object is found

Examples

## Not run: 
s3_object_exists("s3://hfty-test-bucket/text_file.txt")
s3_object_exists("s3://hfty-test-bucket/text_file.txt", conf = list(region = "us-east-2"))

## End(Not run)


fcocquemas/hfty.helpers documentation built on Feb. 13, 2023, 7:25 a.m.