/** * Write a file * * @param string $path * @param string $contents * @param mixed $config * @return array file metadata */ public function write($path, $contents, $config = null) { $config = Util::ensureConfig($config); $options = $this->getOptions($path, array('Body' => $contents, 'ContentType' => Util::guessMimeType($path, $contents), 'ContentLength' => Util::contentSize($contents)), $config); $result = $this->client->putObject($options); if ($result === false) { return false; } return $this->normalizeObject($options); }