Send to the remote shell, its new name to be shell expanded
343186
def rename(self, name):
        """"""
        if name:
            # defug callback add?
            rename1, rename2 = callbacks.add(
                b'rename', self.change_name, False)
            self.dispatch_command(b'/bin/echo "' + rename1 + b'""' + rename2 +
                                  b'"' + name + b'\n')
        else:
            self.change_name(self.hostname.encode())
1315806
def renameSNPs(inPrefix, updateFileName, outPrefix):
    """"""
    plinkCommand = ["plink", "--noweb", "--bfile", inPrefix, "--update-map",
                    updateFileName, "--update-name", "--make-bed", "--out",
                    outPrefix]
    runCommand(plinkCommand)
483538
def renameTable(self, login, oldTableName, newTableName):
    
    self.send_renameTable(login, oldTableName, newTableName)
    self.recv_renameTable()
404606
function initRemote () {
      remoteName = "remote-" + crypto.createHash('md5').update(options.remote).digest('hex').substring(0, 6);

      if (shelljs.exec('git remote', {silent: true}).output.indexOf(remoteName) === -1) {
        log.subhead('Creating remote.');
        execWrap('git remote add ' + remoteName + ' ' + options.remote);
      }
    }
693565
def remote_close(self):
        
        self.fp.close()
        self.fp = None
        # on windows, os.rename does not automatically unlink, so do it
        # manually
        if os.path.exists(self.destfile):
            os.unlink(self.destfile)
        os.rename(self.tmpname, self.destfile)
        self.tmpname = None
        if self.mode is not None:
            os.chmod(self.destfile, self.mode)
591536
def rename(self, new_name):
        """"""
        old_name = self.name
        self.name = new_name
        pypath = self.relative_pythonpath  # ??
        self.root_path = self.root_path[:-len(old_name)]+new_name
        self.relative_pythonpath = pypath  # ??
        self.save()
461019
def rename(name, new_name):
    '''
    
    '''
    current_info = info(name)
    if not current_info:
        raise CommandExecutionError('User \'{0}\' does not exist'.format(name))
    new_info = info(new_name)
    if new_info:
        raise CommandExecutionError(
            'User \'{0}\' already exists'.format(new_name)
        )
    _dscl(
        ['/Users/{0}'.format(name), 'RecordName', name, new_name],
        ctype='change'
    )
    # dscl buffers changes, sleep 1 second before checking if new value
    # matches desired value
    time.sleep(1)
    return info(new_name).get('RecordName') == new_name
1292256
def rename(self, new_name):
    
    update = copy.copy(self)
    update.name = new_name
    return self._do_update(update)
750375
def build_remote_cmd(task, cmd_str, input, given_opts, ssh_opts)
      Remote::Cmd.new(cmd_str, ssh_opts)
    end
1234548
def rename_script(rename=None):  # noqa: E501
    
    if connexion.request.is_json:
        rename = Rename.from_dict(connexion.request.get_json())  # noqa: E501

    if(not hasAccess()):
        return redirectUnauthorized()

    driver = LoadedDrivers.getDefaultDriver()
    if (not driver.renameScript(rename.original.name, rename.new.name)):
        return ErrorResponse(status=500, message='Cannot rename to an existing file.')
    return Response(status=200, body={'file-name': rename.new.name})
154718
function (args, callback) {
        if (ternserver) {
          ternserver.request({
              query: {
                type: "rename",  //$NON-NLS-1$
                file: args.meta.location,
                end: args.params.offset,
                newName: args.newname
              },
              files: args.files
            },
            function (error, changes) {
              if (error) {
                callback({
                  request: 'rename',
                  error: typeof error === 'string' ? error : error.message,
                  message: Messages['failedRenameTern']
                }); //$NON-NLS-1$
              } else if (changes && Array.isArray(changes.changes)) {
                callback({request: 'rename', changes: changes}); //$NON-NLS-1$
              } else {
                callback({request: 'rename', changes: []}); //$NON-NLS-1$
              }
            });
        } else {
          callback({request: 'rename', message: Messages['failedRenameNoServer']}); //$NON-NLS-1$
        }
      }
1258013
def expand(self, expand):
        '''
        
        '''
        self._expand = expand
        cmd = self._original_cmd
        if len(cmd) == 1:
            if not type(cmd[0]) in (str, unicode):
                cmd = cmd[0]
            else:
                cmd = shlex.split(cmd[0])
        cmd = [os.path.expanduser(os.path.expandvars(arg)) for arg in cmd]
        self._cmd, self._args = cmd[0], cmd[1:]
        return self
251130
def rename(name, kwargs, call=None):
    '''
    
    '''
    if call != 'action':
        raise SaltCloudSystemExit(
            'The rename action must be called with -a or --action.'
        )

    log.info('Renaming %s to %s', name, kwargs['newname'])

    set_tags(name, {'Name': kwargs['newname']}, call='action')

    salt.utils.cloud.rename_key(
        __opts__['pki_dir'], name, kwargs['newname']
    )
176325
private static String shellifyName(String name)
   {
      String newName = WHITESPACES.matcher(name.trim()).replaceAll("-");
      // /FORGE-2690: Special case when command name ends with -
      if (newName.endsWith("-"))
      {
         newName = newName.substring(0, newName.length() - 1);
      }
      return COLONS.matcher(newName).replaceAll("");
   }
940427
public void rename(String oldpath, String newpath)
			throws SftpStatusException, SshException {
		String from = resolveRemotePath(oldpath);
		String to = resolveRemotePath(newpath);

		SftpFileAttributes attrs = null;

		try {
			attrs = sftp.getAttributes(to);

		} catch (SftpStatusException ex) {
			sftp.renameFile(from, to);
			return;
		}

		if (attrs != null && attrs.isDirectory()) {
			sftp.renameFile(from, to);
		} else {
			throw new SftpStatusException(
					SftpStatusException.SSH_FX_FILE_ALREADY_EXISTS, newpath
							+ " already exists on the remote filesystem");
		}

	}
1318131
def sendCMD (self, vel):
        '''
        

        '''
        self.lock.acquire()
        self.vel = vel
        self.lock.release()
216991
def rename(self, req, parent, name, newparent, newname):
        
        self.reply_err(req, errno.EROFS)