function s3_object_info in Filebrowser 7.3
Same name and namespace in other branches
- 7.4 modules/s3_fb.module \s3_object_info()
Takes a path to an S3 object and breakes it down to it's bucket and key
Parameters
string $path Path to breakdown:
Return value
array array with value of bucket and key of object
2 calls to s3_object_info()
- s3_create_archive in modules/
s3_fb.module - We cannot use regular PHP file functions to create the archive files so we use AWS SDK
- s3_delete in modules/
s3_fb.module
File
- modules/
s3_fb.module, line 123
Code
function s3_object_info($path) {
$bucket_key = str_replace('s3://', '', $path);
$arr = explode('/', $bucket_key);
$bucket = $arr[0];
unset($arr[0]);
$key = implode('/', $arr);
return array(
'Bucket' => $bucket,
'Key' => $key,
);
}