Rename models and repositories.
170268
public function renameModelsAndRepositories()
    {
        $moduleDir = base_path('Modules/'.$this->module);
        $paths = [
            $moduleDir.'/Models/Object.php',
            $moduleDir.'/Facades/Objects.php',
            $moduleDir.'/Repositories/EloquentObject.php',
            $moduleDir.'/resources/scss/public/_object.scss',
            $moduleDir.'/resources/scss/public/_object-list.scss',
        ];
        foreach ($paths as $path) {
            $this->files->move($path, $this->transformFilename($path));
        }
    }
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
668849
def versioning_model_classname(manager, model):
    """"""
    if manager.options.get('use_module_name', True):
        return '%s%sVersion' % (
            model.__module__.title().replace('.', ''), model.__name__)
    else:
        return '%sVersion' % (model.__name__,)
496675
private void rename(CmisObject object, String name){
        Map<String, Object> newName = new HashMap<String, Object>();
        newName.put("cmis:name", name);

        object.updateProperties(newName);
    }
1292256
def rename(self, new_name):
    
    update = copy.copy(self)
    update.name = new_name
    return self._do_update(update)
454082
function renameKeys(rules) {
  var result = {};
  Object.keys(rules).forEach(function (k) {
    result[k.match(/[^-]+$/)] = rules[k];
  });
  return result;
}
1062603
def renamed_tree(self, source, dest):
        """"""
        dirname = osp.abspath(to_text_string(source))
        tofile = to_text_string(dest)
        for fname in self.get_filenames():
            if osp.abspath(fname).startswith(dirname):
                new_filename = fname.replace(dirname, tofile)
                self.renamed(source=fname, dest=new_filename)
128080
def rename(oldPath, newPath, **kwargs):
    """"""
    import os
    return os.rename(oldPath, newPath, **kwargs)
1275260
def rename_in_module(occurrences_finder, new_name, resource=None,
                     pymodule=None, replace_primary=False, region=None,
                     reads=True, writes=True):
    """"""
    if resource is not None:
        source_code = resource.read()
    else:
        source_code = pymodule.source_code
    change_collector = codeanalyze.ChangeCollector(source_code)
    for occurrence in occurrences_finder.find_occurrences(resource, pymodule):
        if replace_primary and occurrence.is_a_fixed_primary():
            continue
        if replace_primary:
            start, end = occurrence.get_primary_range()
        else:
            start, end = occurrence.get_word_range()
        if (not reads and not occurrence.is_written()) or \
           (not writes and occurrence.is_written()):
            continue
        if region is None or region[0] <= start < region[1]:
            change_collector.add_change(start, end, new_name)
    return change_collector.get_changed()
949905
def renames(self, new):
        
        os.renames(self, new)
        return self._next_class(new)
186306
protected function renameStubs()
    {
        foreach ($this->stubsToRename() as $stub) {
            (new Filesystem)->move($stub, str_replace('.stub', '.php', $stub));
        }
    }
378218
def rename(to_name)
      begin
        session.
          with(database: "admin", read: :primary).
          command(renameCollection: "#{database.name}.#{name}", to: "#{database.name}.#{to_name}")
      rescue Moped::Errors::OperationFailure => e
        raise e unless e.ns_not_exists?
        false
      end
    end
216991
def rename(self, req, parent, name, newparent, newname):
        
        self.reply_err(req, errno.EROFS)
654244
def rename(self, new_name, range=None):
        """"""
        self.log.debug('rename: in')
        if not new_name:
            new_name = self.editor.ask_input("Rename to:")
        self.editor.write(noautocmd=True)
        b, e = self.editor.word_under_cursor_pos()
        current_file = self.editor.path()
        self.editor.raw_message(current_file)
        self.send_refactor_request(
            "RefactorReq",
            {
                "typehint": "RenameRefactorDesc",
                "newName": new_name,
                "start": self.get_position(b[0], b[1]),
                "end": self.get_position(e[0], e[1]) + 1,
                "file": current_file,
            },
            {"interactive": False}
        )
396708
def rename(old, new)
      parameters = Specification.new(
        old: Types::Tags,
        new: Types::Tags
      ).parameters(old: old, new: new)
      @client.action('/tags/rename', parameters)
      self
    end
67707
def rename(self, core, other):
        """"""
        params = {
            'action': 'RENAME',
            'core': core,
            'other': other,
        }
        return self._get_url(self.url, params=params)
1016568
def database_rename(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/rename' % object_id, input_params, always_retry=always_retry, **kwargs)