本文整理汇总了PHP中Aws\S3\S3Client::downloadBucket方法的典型用法代码示例。如果您正苦于以下问题:PHP S3Client::downloadBucket方法的具体用法?PHP S3Client::downloadBucket怎么用?PHP S3Client::downloadBucket使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Aws\S3\S3Client
的用法示例。
在下文中一共展示了S3Client::downloadBucket方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: downloadBucket
/**
* Downloads a bucket to the local filesystem
*
* @param string $directory Directory to download to
* @param string $bucket Bucket to download from
* @param string $keyPrefix Only download objects that use this key prefix
* @param array $options Associative array of download options
* - params: Array of parameters to use with each GetObject operation performed during the transfer
* - base_dir: Base directory to remove from each object key when storing in the local filesystem
* - force: Set to true to download every file, even if the file is already on the local filesystem and has not
* changed
* - concurrency: Maximum number of parallel downloads (defaults to 10)
* - debug: Set to true or a fopen resource to enable debug mode to print information about each download
* - allow_resumable: Set to true to allow previously interrupted downloads to be resumed using a Range GET
*/
public function downloadBucket($directory, $bucket, $keyPrefix = '', array $options = [])
{
return $this->instance->downloadBucket($directory, $bucket, $keyPrefix, $options);
}
示例2: download
/**
* download
*
* @param string $directory
* @param string $keyPrefix
* @param array $options
*/
public function download($directory, $keyPrefix = null, array $options = array())
{
$this->client->downloadBucket($directory, $this->name, $keyPrefix, $options);
}