rename meta file
@param $current
@param $new
175367
public function move($current,$new)
	{
		$metaFile = $this->getMetaFilePath($current);
		if ($this->fs->exists($metaFile)) {
			$this->fs->move($metaFile,$this->getMetaFilePath($new));
			if ($this->f3->get('CACHE')) {
				$cache = \Cache::instance();
				if ($cache->exists($cacheHash = $this->getCacheHash($current)))
					$cache->clear($cacheHash);
			}
		}
	}
700549
public static function rename($oldName, $newName, $context = null)
    {
        return self::resourceExists($oldName) ? rename($oldName, $newName, $context) : false;
    }
391779
public function rename($path, $newpath)
    {
        $pathinfo = pathinfo($path);
        if ($pathinfo['dirname'] != '.') {
            $path_remote = $pathinfo['dirname'] . '/' . $pathinfo['filename'];
        } else {
            $path_remote = $pathinfo['filename'];
        }

        $newpathinfo = pathinfo($newpath);
        if ($newpathinfo['dirname'] != '.') {
            $newpath_remote = $newpathinfo['dirname'] . '/' . $newpathinfo['filename'];
        } else {
            $newpath_remote = $newpathinfo['filename'];
        }

        $result = Uploader::rename($path_remote, $newpath_remote);

        return $result['public_id'] == $newpathinfo['filename'];
    }
1198758
public function rename($filename, $newname, $try_another_name = false)
    {
        // Verificar se deve tentar outro nome caso ja exista
        if ($try_another_name)
        {
            $file_mask = preg_replace('/(.[a-zA-Z0-9]+)$/', '_%s\1', $filename);
            $contador = 1;
            while ($this->exists($newname))
            {
                $newname = sprintf($file_mask, $contador);
                $contador += 1;
            }
        }

        $this->copy($filename, $newname);
        $this->delete($filename);

        return $newname;
    }
84231
public function rename($path, $newpath)
    {
        $statusCopy = $this->copy($path, $newpath);
        $statusRemoveOld = $this->delete($path);

        return $statusCopy && $statusRemoveOld;
    }
179688
public function rename($newKey)
    {
        $this->filesystem->rename($this->key, $newKey);

        $this->key = $newKey;
    }
510316
function renameFiles(files)
{
  files.forEach(function (file)
  {
    var originalName = path.basename(file);
    var newFileName = originalName.toLowerCase();
    var directory = path.dirname(file);
    if (originalName != newFileName)
    {
      fs.renameSync(file, directory + "/" + newFileName); //, function(err)

      if (debug)
        console.log('Renamed: %s --> %s', originalName, newFileName);

      originalFiles.push(originalName);
      renamedFiles.push(newFileName);
    }
  });
}
656633
public function replaceFile($old, $new, array $content)
    {
        $oldFileContent = file_get_contents($old);
        file_put_contents($new, vsprintf($oldFileContent, $content));
        unlink($old);
    }
1115476
public function rename($index, $newName)
    {
        if (!isset($this->names[$index])) {
            return false;
        }
        if ($this->names[$index] === $newName) {
            return false;
        }
        $this->context->getMappings();
        $this->names[$index] = $newName;
        $this->indexes = array_flip($this->names);
        $this->onRename($index, $newName);
        return true;
    }
973243
public function rename($path, $newpath)
    {
        $newpath = static::normalizerPath($newpath);

        $this->writeStream($newpath, $this->readStream($path)['stream'], new Config() );

        $this->delete($path);

        return true;
    }
714448
public function rename($path, $newpath)
    {
        list ($oldParent, $fileId) = $this->splitPath($path);
        list ($newParent, $newName) = $this->splitPath($newpath);

        $file = new Google_Service_Drive_DriveFile();
        $file->setName($newName);
        $opts = [
            'fields' => $this->fetchfieldsGet
        ];
        if ($newParent !== $oldParent) {
            $opts['addParents'] = $newParent;
            $opts['removeParents'] = $oldParent;
        }

        $updatedFile = $this->service->files->update($fileId, $file, $this->applyDefaultParams($opts, 'files.update'));

        if ($updatedFile) {
            $this->cacheFileObjects[$updatedFile->getId()] = $updatedFile;
            $this->cacheFileObjectsByName[$newParent . '/' . $newName] = $updatedFile;
            return true;
        }

        return false;
    }
86646
public static function rename(string $name, string $newName, bool $overwrite = true): void
	{
		NetteFileSystem::rename($name, $newName, $overwrite);
	}
959895
public void rename(String newName) {
        URL url = FILE_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());
        BoxAPIResponse response = request.send();
        response.disconnect();
    }
1298607
protected function updateConfigs(string $currName, string $newName)
    {
        $configFiles = $this->fileSystem->getFiles(Config::get('paths', 'config'), true);

        foreach ($configFiles as $file) {
            $currentContents = $this->fileSystem->read($file);
            $updatedContents = str_replace(
                "$currName\\",
                "$newName\\",
                $currentContents
            );
            $this->fileSystem->write($file, $updatedContents);
        }
    }
88886
public function renameColumn($oldName, $newName)
    {
        foreach ($this->getDataTables() as $table) {
            $table->renameColumn($oldName, $newName);
        }
    }
62881
public function rename(string $newName) : bool
    {
        $renamed = rename($this->realPath, $newName);

        if ($renamed) {
            $this->realPath = realpath($newName);
        }

        return $renamed;
    }
328094
public function rename($nameold,$namenew,$path){
        if($this->validNameFile($nameold,false) && $this->validNameFile($namenew,false)){
            $fullpath = $this->getFullPath().$path;
            $nameold = $this->clearNameFile($nameold);
            $namenew = $this->clearNameFile($namenew);

            $file = new Filesystem;
            if($file->exists($fullpath.$nameold)){
                if( $this->config['debug'] ) $this->_log('$fullpath.$nameold - '.$fullpath.$nameold);
                if(is_dir($fullpath.$nameold)){
                    $namenew = $this->sanitizeNameFolder($namenew);
                    if($file->exists($fullpath.$namenew)==false){
                        $file->rename($fullpath.$nameold,$fullpath.$namenew);
                        $result = array("query"=>"BE_RENAME_MODIFIED","params"=>array());
                        $this->setInfo(array("msg"=>$result,"data"=>array("namefile" => $namenew )));

                    }else{
                        $result = array("query"=>"BE_RENAME_EXISTED","params"=>array());
                        $this->setInfo(array("msg"=>$result,"status"=>0));
                    }
                }elseif(is_file($fullpath.$nameold)){
                    if($this->validExt($nameold)){
                        $extold = $this->getExtension($nameold);
                        $namenew = $namenew.'.'.$extold;
                        if($file->exists($fullpath.$namenew)==false){
                            $file2 = new \SplFileInfo($fullpath.$nameold);
                            if(in_array($file2->getExtension(), $this->config['images']['images_ext'])){
                                $filename = $file2->getFilename();
                                foreach ($this->config['images']['resize'] as $key => $value) {
                                    $image_info = $this->imageSizeName($path,$filename,$value);
                                    $filename_old = $image_info['name'];
                                    $fullpaththumb_name = $this->getFullPath().'/'.$this->config['folder_thumb'].$path.$filename_old;
                                    $file->remove($fullpaththumb_name);
                                }
                            }
                            $file->rename($fullpath.$nameold,$fullpath.$namenew);
                            $file3 = new \SplFileInfo($fullpath.$namenew);
                            $this->createThumb($file3,$path);
                            $result = array("query"=>"BE_RENAME_MODIFIED","params"=>array());
                            $this->setInfo(array("msg"=>$result,"data"=>array("namefile" => $namenew )));
                        }else{
                            $result = array("query"=>"BE_RENAME_EXISTED","params"=>array());
                            $this->setInfo(array("msg"=>$result,"status"=>0));
                        }
                    }else{
                        $result = array("query"=>"BE_RENAME_FILENAME_NOT_VALID","params"=>array());
                        $this->setInfo(array("msg"=>$result, "status"=>0));
                    }
                }
            }else{
                $result = array("query"=>"BE_RENAME_NOT_EXISTS","params"=>array());
                $this->setInfo(array("msg"=>$result, "status"=>0));
            }
        }else{
           $result = array("query"=>"BE_RENAME_FILENAME_NOT_VALID","params"=>array());
           $this->setInfo(array("msg"=>$result, "status"=>0));
       }
   }