.. seealso:: :func:`os.rename`
483495
def rename(self, new):
        
        os.rename(self, new)
        return self._next_class(new)
1153450
def rename(self, mapping):
        
        for old_key, new_key in mapping:
            self.dict[new_key] = self.dict[old_key]
            del self.dict[old_key]
905486
def _windows_rename(self, tmp_filename):
        

        os.remove(self.input_file) if os.path.isfile(self.input_file) else None
        os.rename(tmp_filename, self.input_file)
777394
def rename(path):
    """"""

    new_path = prompt(path)

    if path != new_path:
        try:
            from shutil import move
        except ImportError:
            from os import rename as move

        move(path, new_path)

    return new_path
748583
def rename(self, paths, dst):
        ''' 
        '''
        if not isinstance(paths, list):
            raise InvalidInputException("Paths should be a list")
        if not paths:
            raise InvalidInputException("rename: no path given")
        if not dst:
            raise InvalidInputException("rename: no destination given")

        processor = lambda path, node, dst=dst: self._handle_rename(path, node, dst)
        for item in self._find_items(paths, processor, include_toplevel=True):
            if item:
                yield item
118451
def change_numbering(self, rename_dict, inplace=False):
        
        output = self if inplace else self.copy()
        new_index = [rename_dict.get(key, key) for key in self.index]
        output.index = new_index
        if not inplace:
            return output
495800
def rename(self, dn: str, new_rdn: str, new_base_dn: Optional[str] = None) -> None:
        

        return self._do_with_retry(
            lambda obj: obj.rename_s(dn, new_rdn, new_base_dn))
939331
function renameFile (oldFile, newFile) {
    if (!isFileRegistered(oldFile) || isFileRegistered(newFile)) { return undefined; }

    let item = fileRegistry[oldFile];

    item.file = newFile;

    fileRegistry[newFile] = item;

    delete fileRegistry[oldFile];
}
1080205
def rename(self, **mapping):
        
        params = {k: v for k, v in self.get_param_values() if k != 'name'}
        return self.__class__(rename=mapping,
                              source=(self._source() if self._source else None),
                              linked=self.linked, **params)
1088863
def rename(self, name):
        
        if name is None:
            raise Exception("name (%s) not-valid" % (name,))
        self.prefix, self.name = splitPrefix(name)
1329297
def rename(args):
    
    p = OptionParser(rename.__doc__)
    opts, args = p.parse_args(args)

    if len(args) != 2:
        sys.exit(not p.print_help())

    ingff3, switch = args
    switch = DictFile(switch)

    gff = Gff(ingff3)
    for g in gff:
        id, = g.attributes["ID"]
        newname = switch.get(id, id)
        g.attributes["ID"] = [newname]

        if "Parent" in g.attributes:
            parents = g.attributes["Parent"]
            g.attributes["Parent"] = [switch.get(x, x) for x in parents]

        g.update_attributes()
        print(g)
429334
function renameKey(obj, prevKey, nextKey) {
  return mapKeys(obj, (_, key) => (key === prevKey ? nextKey : key))
}
704159
def rename(filter, source_uri, target_uri=nil, &each_key)
      target_uri ||= source_uri
      move_keys filter, source_uri, target_uri if source_uri != target_uri
      source_keys = Familia.redis(source_uri).keys(filter)
      puts "Renaming #{source_keys.size} keys from #{source_uri} (filter: #{filter})"
      source_keys.each_with_index do |key,idx|
        Familia.trace :RENAME1, Familia.redis(source_uri), "#{key}", ''
        type = Familia.redis(source_uri).type key
        ttl = Familia.redis(source_uri).ttl key
        newkey = each_key.call(idx, type, key, ttl) unless each_key.nil?
        Familia.trace :RENAME2, Familia.redis(source_uri), "#{key} -> #{newkey}", caller[0]
        ret = Familia.redis(source_uri).renamenx key, newkey
      end
    end
414043
def rename(self, new_path):
        
        rename_path = fix_raw_path(new_path)
        if is_folder(self.path):
            os.rename(self.path, rename_path)
        else:
            os.renames(self.path, rename_path)
621998
def rename(self, rename_pair_list, **kwargs):
        
        foo = []
        for path, newname in rename_pair_list:
            foo.append({'path': path,
                        'newname': newname
                        })

        data = {'filelist': json.dumps(foo)}
        params = {
            'opera': 'rename'
        }

        url = 'http://{0}/api/filemanager'.format(BAIDUPAN_SERVER)
        logging.debug('rename ' + str(data) + 'URL:' + url)
        return self._request('filemanager', 'rename', url=url, data=data, extra_params=params, **kwargs)
706518
def rename(self, new_name):
        

        yield from self._hypervisor.send("nio rename {name} {new_name}".format(name=self._name, new_name=new_name))

        log.info("NIO {name} renamed to {new_name}".format(name=self._name, new_name=new_name))
        self._name = new_name
216991
def rename(self, req, parent, name, newparent, newname):
        
        self.reply_err(req, errno.EROFS)