public static function S3fsService::getListObjectVersionArgs in S3 File System 8.3
Same name and namespace in other branches
- 4.0.x src/S3fsService.php \Drupal\s3fs\S3fsService::getListObjectVersionArgs()
Return arguments for use in listObjectVersions.
Parameters
array $config: The S3 bucket configuration.
Return value
array An array of arguments.
Overrides S3fsServiceInterface::getListObjectVersionArgs
2 calls to S3fsService::getListObjectVersionArgs()
- S3fsService::refreshCache in src/
S3fsService.php - Refreshes the metadata cache.
- S3fsService::validate in src/
S3fsService.php - Validate the S3fs config.
File
- src/
S3fsService.php, line 355
Class
- S3fsService
- Defines a S3fsService service.
Namespace
Drupal\s3fsCode
public static function getListObjectVersionArgs(array $config) {
// Set up the args for list objects.
$args = [
'Bucket' => $config['bucket'],
];
if (!empty($config['root_folder'])) {
// If the root_folder option has been set, retrieve from S3 only those
// files which reside in the root folder.
$args['Prefix'] = "{$config['root_folder']}/";
}
return $args;
}