rename and/or move folder
@param  string $oldName name or instance of folder
@param  string $newName new global name of folder
515121
public function renameFolder($cb, $oldName, $newName)
    {
        $this->onResponse->push($cb);
        $this->writeln(self::TAG_RENAMEFOLDER . " RENAME "
            .$this->escapeString($oldName)." ".$this->escapeString($newName));
    }
1347198
public static function move($oldName, $newName, $context = null)
    {
        return self::rename($oldName, $newName, $context);
    }
1212862
public function rename($oldName, $newName)
    {
        if (null !== $this->collection->get($newName)) {
            throw new RuntimeException(
                sprintf(
                    'Could not rename toggle %1$s to %2$s, a toggle with name %2$s already exists',
                    $oldName,
                    $newName
                )
            );
        }

        $currentToggle = $this->collection->get($oldName);

        if (null === $currentToggle) {
            throw new RuntimeException(
                sprintf(
                    'Could not rename toggle %1$s to %2$s, toggle with name %1$s does not exists',
                    $oldName,
                    $newName
                )
            );
        }

        $currentToggle->rename($newName);

        if (false === $this->add($currentToggle)) {
            throw new RuntimeException(
                sprintf(
                    'Failed to rename toggle %1$s to %2$s, an error occurred when saving toggle with new name',
                    $oldName,
                    $newName
                )
            );
        }

        return $this->remove($oldName);
    }
88886
public function renameColumn($oldName, $newName)
    {
        foreach ($this->getDataTables() as $table) {
            $table->renameColumn($oldName, $newName);
        }
    }
1238959
public function renameColumn($old, $new)
    {
        $this->append(sprintf(' RENAME COLUMN %s TO %s ', $this->quote($old), $this->quote($new)));
        return $this;
    }
326208
public function rename($oldName, $newName)
    {
        if (! ssh2_sftp_rename($this->sFtp, $oldName, $newName)) {
            throw new \RuntimeException('Name can not be changed');
        }
        return true;
    }
657310
public function rename($old_name, $new_name)
    {
        $old_name = $this->_getAbsoluteRemotePath($old_name);
        $new_name = $this->_getAbsoluteRemotePath($new_name);

        if (false === file_exists($old_name)) {
            return $this->_trigger_error(sprintf('Could not open remote file: %s.', $old_name));
        }

        if (true === file_exists($new_name)) {
            return $this->_trigger_error(sprintf('Remote file already exists: %s.', $new_name));
        }

        if (false === @rename($old_name, $new_name)) {
            return $this->_trigger_error(sprintf('Unable to rename %s to %s', $old_name, $new_name));
        }

        return true;
    }
835809
public function renameIndex($oldName, $newName)
    {
        if (!$this->hasIndex($oldName)) {
            throw SchemaException::tableIndexDoesNotExist($this->getName(), $oldName);
        }

        if ($this->hasIndex($newName)) {
            throw SchemaException::tableIndexAlreadyExists($this->getName(), $newName);
        }

        $this->indexes[$oldName]->setName($newName);
        $this->indexes[$newName] = $this->indexes[$oldName];
        unset($this->indexes[$oldName]);
    }
692511
public function rename(string $newName): bool {
		return $this->manager->rename($this->getUrl(), Paths::getPath($this->getAbsolutePath()) . "/" . $newName);
	}
253857
public function renameName($nameIndex, $newName)
    {
        $nameIndex = (int)$nameIndex;
        foreach ($this->positions as $position) {
            $source = $position->source;
            if ($source->nameIndex === $nameIndex) {
                $source->name = $newName;
            }
        }
    }
660431
public function rename($newFilename, $context = null)
    {
        $params[] = $this->getRealPath();
        $params[] = dirname($this->getRealPath()) . DIRECTORY_SEPARATOR . $newFilename;
        $params[] = $context;

        return call_user_func_array('rename', $params);
    }
679097
public function renameTable($old, $new)
    {
        $this->replaceText("`$old`", "`$new`");
        $this->replaceText("\"$old\"", "\"$new\"");
        $this->replaceText(Convert::symbol2sql($old), Convert::symbol2sql($new));
    }
700549
public static function rename($oldName, $newName, $context = null)
    {
        return self::resourceExists($oldName) ? rename($oldName, $newName, $context) : false;
    }
898157
public function rename(String $oldName, String $newName) : Bool
    {
        if( @ssh2_sftp_rename($this->connect, $oldName, $newName) )
        {
            return true;
        }
        else
        {
            throw new FolderChangeNameException(NULL, $oldName);
        }
    }
632950
public void rename(String newName) {
        URL url = FOLDER_INFO_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
        BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "PUT");

        JsonObject updateInfo = new JsonObject();
        updateInfo.add("name", newName);

        request.setBody(updateInfo.toString());
        BoxJSONResponse response = (BoxJSONResponse) request.send();
        response.getJSON();
    }
1361149
public function renameTag($oldName, $newName) {
		return $this
			->begin()// http://stackoverflow.com/a/1873932
			// create new as alias to old (`git tag NEW OLD`)
			->run('git tag', $newName, $oldName)// delete old (`git tag -d OLD`)
			->removeTag($oldName)// WARN! removeTag() calls end() method!!!
			->end();
	}
481877
public function renameColumn($oldName, $newName)
    {
        if (isset($this[$oldName])) {
            $this[$newName] = $this[$oldName];
        }

        // outside the if () since we want to delete nulled columns
        if ($this->offsetExists($oldName)) {
            unset($this[$oldName]);
        }
    }