Some utility functions for working with S3 objects and buckets

get_bucketname(x, ...)

# S3 method for class 'character'
get_bucketname(x, ...)

# S3 method for class 's3_bucket'
get_bucketname(x, ...)

# S3 method for class 's3_object'
get_bucketname(x, ...)

get_objectkey(x, ...)

# S3 method for class 'character'
get_objectkey(x, ...)

# S3 method for class 's3_object'
get_objectkey(x, ...)

Arguments

x

S3 object, s3:// URL or a string

...

Ignored.

Value

get_bucketname returns a character string with the name of the bucket.

get_objectkey returns a character string with S3 key which is the part excluding bucket name and leading slashes