Deletes all of the versions of all Amazon S3 objects inside the specified bucket.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
The name of the bucket to use. |
|
|
Optional |
A Perl-Compatible Regular Expression (PCRE) to filter the names against. The default value is |
Returns
Type |
Description |
---|---|
A value of |
Examples
Delete ALL versions of ALL objects within a bucket.
// Instantiate the class $s3 = new AmazonS3(); $bucket = 'my-bucket' . strtolower($s3->key); $response = $s3->delete_all_object_versions($bucket); // Success? var_dump($response !== false);Result:
bool(true)
Delete ALL versions of objects within a bucket that match the PCRE regular expression.
// Instantiate the class $s3 = new AmazonS3(); $bucket = 'my-bucket' . strtolower($s3->key); $response = $s3->delete_all_object_versions($bucket, '/abc.txt/i'); // Success? var_dump($response !== false);Result:
bool(true)
See Also
Source
Method defined in services/s3.class.php | Toggle source view (97 lines) | View on GitHub