For each file that has been transferred and renamed, updated
        command_line and configfiles to reflect that rewrite.
971676
def rewrite_input_paths(self):
        
        for local_path, remote_path in self.file_renames.items():
            self.job_inputs.rewrite_paths(local_path, remote_path)
973466
private function renameDirectories(): void
    {
        //update directory names and update file created paths accordingly
        foreach ($this->dirsToRename as $dirPath) {
            $updateDirPath = $this->pathHelper->renamePathBasenameSingularOrPlural(
                $dirPath,
                $this->singularNamespacedName,
                $this->pluralNamespacedName
            );
            foreach ($this->filesCreated as $k => $filePath) {
                $this->filesCreated[$k] = \str_replace($dirPath, $updateDirPath, $filePath);
            }
        }
    }
753373
def changed_files(cls, scm, changes_since=None, diffspec=None):
    """"""
    workspace = ScmWorkspace(scm)
    if diffspec:
      return workspace.changes_in(diffspec)

    changes_since = changes_since or scm.current_rev_identifier()
    return workspace.touched_files(changes_since)
802901
def _update_config(self,directory,filename):
        """"""
        basefilename=os.path.splitext(filename)[0]
        ext=os.path.splitext(filename)[1].lower()
        #if filename==LOCATION_FILE:
            #return self._update_config_location(directory)
        #FIXME
        #elif filename==TAG_FILE:
            #return self._update_config_tags(directory)
        if filename==SET_FILE:
            print("%s - Moving photos to album"%(filename))
            return self._upload_media(directory,movealbum_request=True)
        elif filename==MEGAPIXEL_FILE:
            print("%s - Resizing photos"%(filename))
            return self._upload_media(directory,resize_request=True)
        elif ext in self.FB_META_EXTENSIONS:
            print("%s - Changing photo title"%(basefilename))
            return self._upload_media(directory,basefilename,changetitle_request=True)

        return False
639341
function renameLinks (files)
{
  if (originalFiles.length <= 0)
  {
    if (debug)
      console.log("No links to rename.");
    return;
  }

  files.forEach(function (file)
  {
    // Read the file
    data = fs.readFileSync(file, 'ascii');

    // Find/replace the file names that were renamed
    for (var i = 0; i < originalFiles.length; i++)
    {
      var findString = '/' + originalFiles[i] + '\"';
      var replaceString = '/' + renamedFiles[i] + '\"';

      data = data.replace(findString, replaceString);
    }

    // Write back
    fs.writeFile(file, data, 'ascii', function (err) {
      if (err)
        throw err;
    });

    if (debug)
      console.log('Renamed links in: %s', file);
  });
}
1350847
def rename_file(self, old_save_name, new_save_name, new_path):
        
        if old_save_name in self._files:
            del self._files[old_save_name]
        self.update_file(new_save_name, new_path)
1206715
def changed_files(self) -> typing.List[str]:
        
        changed_files: typing.List[str] = [x.a_path for x in self.repo.index.diff(None)]
        LOGGER.debug('changed files: %s', changed_files)
        return changed_files
626029
function rewriteFile(args, generator) {
    args.path = args.path || process.cwd();
    const fullPath = path.join(args.path, args.file);

    args.haystack = generator.fs.read(fullPath);
    const body = rewrite(args);
    generator.fs.write(fullPath, body);
}
983972
def update_vcs(self, fname, index):
        """"""
        fpath = os.path.dirname(fname)
        branches, branch, files_modified = get_git_refs(fpath)
        text = branch if branch else ''

        if len(files_modified):
            text = text + ' [{}]'.format(len(files_modified))

        self.setVisible(bool(branch))
        self.set_value(text)
593791
def update_dependent_files(self, prev_commands=[]):
        
        for command in prev_commands:
            for my_input in self.input_parts:
                for their_output in command.output_parts:
                    if their_output == my_input:
                        my_input.filename = their_output.eval()
977306
def file_modify(filename, settings):
        
        for k, v in settings.items():
            if k == "mode":
                os.chmod(filename,v)
            if k == "owners":
                os.chown(filename,v)
1079785
def update(sc, filename, asset_id):
    '''
    
    '''
    addresses = []
    with open(filename) as hostfile:
        for line in hostfile.readlines():
            addresses.append(line.strip('\n'))
    sc.asset_update(asset_id, dns=addresses)
370511
function rewriteSecureNginxFiles()
    {
        $tld = $this->configuration->read()['tld'];

        $this->site->resecureForNewTld($tld, $tld);
    }
591484
def modified_files
      @modified_files ||= begin
        @modified_files = []

        rewritten_commits.each do |rewritten_commit|
          refs = "#{rewritten_commit.old_hash} #{rewritten_commit.new_hash}"
          @modified_files |= Overcommit::GitRepo.modified_files(refs: refs)
        end

        filter_modified_files(@modified_files)
      end
    end
974647
def update_ssh_config(self, path="~/.ssh/config"):
        """"""
        # Read the config file #
        import sshconf
        config = sshconf.read_ssh_config(os.path.expanduser(path))
        # In case it doesn't exist #
        if not config.host(self.instance_name): config.add(self.instance_name)
        # Add the new DNS #
        config.set(self.instance_name, Hostname=self.dns)
        # Write result #
        config.write(os.path.expanduser(path))
819062
def update(self):
        
        with open(os.path.join(self.config_dir, CONFIG_FILE_NAME), 'w') as config_file:
            self.config.write(config_file)
888447
def modified_files(options)
      flags = '--cached' if options[:staged]
      refs = options[:refs]
      subcmd = options[:subcmd] || 'diff'

      `git #{subcmd} --name-only -z --diff-filter=ACMR --ignore-submodules=all #{flags} #{refs}`.
        split("\0").
        map(&:strip).
        reject(&:empty?).
        map { |relative_file| File.expand_path(relative_file) }
    end