KnpLabs/Gaufrette — pull request #59 by adurieux (2012-04-05 14:15:58+00:00)
Title: [S3] Added an overwriteMetadata() function.

* **Description:** added an overwriteMetadata() function.
* **Side effects:** -
* **Bug fix:** -
* **Feature addition:** yes
* **Backwards compatibility break:** no
* **Bundle tests pass:** -
* **Fixes the following tickets:** #44
* **References the following tickets:** -
* **External references :** -
* **Example use :** integrating it directly in the write() method would have required a BC-break on the API, so the syntax is quite cumbersome :

```
$fileSystem
->getAdapter()
->overwriteMetadata($targetFileName,array(
'acl' => \AmazonS3::ACL_PUBLIC,
'contentType' => 'application/javascript; charset=utf-8',
'headers' => array(
'Content-Type' => 'application/javascript; charset=utf-8',
),
'meta' => array(
'Content-Type' => 'application/javascript; charset=utf-8',
),
'storage' => \AmazonS3::STORAGE_REDUCED,
));
```