Webiny\Component\Amazon\S3::deleteMatchingObjects PHP Метод

deleteMatchingObjects() публичный Метод

Deletes objects from Amazon S3 that match the result of a ListObjects operation. For example, this allows you to do things like delete all objects that match a specific key prefix.
См. также: Aws\S3\S3Client::listObjects
См. также: Aws\S3\Model\ClearBucket For more options or customization
public deleteMatchingObjects ( string $bucket, string $prefix = '', string $regex = '', array $options = [] ) : integer
$bucket string Bucket that contains the object keys
$prefix string Optionally delete only objects under this key prefix
$regex string Delete only objects that match this regex
$options array Options used when deleting the object: - before_delete: Callback to invoke before each delete. The callback will receive a Guzzle\Common\Event object with context.
Результат integer Returns the number of deleted keys
    public function deleteMatchingObjects($bucket, $prefix = '', $regex = '', array $options = [])
    {
        return $this->instance->deleteMatchingObjects($bucket, $prefix, $regex, $options);
    }