MCPcopy Create free account
hub / github.com/aws/aws-cli / split_s3_bucket_key

Function split_s3_bucket_key

awscli/customizations/s3/utils.py:240–250  ·  view source on GitHub ↗

Split s3 path into bucket and key prefix. This will also handle the s3:// prefix. :return: Tuple of ('bucketname', 'keyname')

(s3_path)

Source from the content-addressed store, hash-verified

238
239
240def split_s3_bucket_key(s3_path):
241 """Split s3 path into bucket and key prefix.
242
243 This will also handle the s3:// prefix.
244
245 :return: Tuple of ('bucketname', 'keyname')
246
247 """
248 if s3_path.startswith('s3://'):
249 s3_path = s3_path[5:]
250 return find_bucket_key(s3_path)
251
252
253def get_file_stat(path):

Callers 8

_get_s3_rootFunction · 0.90
_run_mainMethod · 0.90
_run_mainMethod · 0.90
_is_s3express_pathMethod · 0.90
_same_keyMethod · 0.90

Calls 1

find_bucket_keyFunction · 0.85

Tested by

no test coverage detected