Gaufrette\Adapter\Ftp::rename PHP Method

rename() public method

public rename ( $sourceKey, $targetKey )
    public function rename($sourceKey, $targetKey)
    {
        $this->ensureDirectoryExists($this->directory, $this->create);
        $sourcePath = $this->computePath($sourceKey);
        $targetPath = $this->computePath($targetKey);
        $this->ensureDirectoryExists(\Gaufrette\Util\Path::dirname($targetPath));
        return ftp_rename($this->getConnection(), $sourcePath, $targetPath);
    }