Arkade\S3\Model\MediaStorage\File\Storage\S3::renameFile PHP Метод

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

public renameFile ( $oldFilePath, $newFilePath )
    public function renameFile($oldFilePath, $newFilePath)
    {
        try {
            $this->client->copyObject(['Bucket' => $this->getBucket(), 'Key' => $newFilePath, 'CopySource' => $this->getBucket() . '/' . $oldFilePath, 'ACL' => 'public-read']);
            $this->client->deleteObject(['Bucket' => $this->getBucket(), 'Key' => $oldFilePath]);
        } catch (S3Exception $e) {
        }
        return $this;
    }