Gaufrette\Adapter\AwsS3::rename PHP Метод

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

public rename ( $sourceKey, $targetKey )
    public function rename($sourceKey, $targetKey)
    {
        $this->ensureBucketExists();
        $options = $this->getOptions($targetKey, array('CopySource' => $this->bucket . '/' . $this->computePath($sourceKey)));
        try {
            $this->service->copyObject(array_merge($options, $this->getMetadata($targetKey)));
            return $this->delete($sourceKey);
        } catch (\Exception $e) {
            return false;
        }
    }