Gaufrette\Adapter\AmazonS3::rename PHP Méthode

rename() public méthode

public rename ( $sourceKey, $targetKey )
    public function rename($sourceKey, $targetKey)
    {
        $this->ensureBucketExists();
        $response = $this->service->copy_object(array('bucket' => $this->bucket, 'filename' => $this->computePath($sourceKey)), array('bucket' => $this->bucket, 'filename' => $this->computePath($targetKey)), $this->getMetadata($sourceKey));
        return $response->isOK() && $this->delete($sourceKey);
    }