Goes through the files and renames them to be lower-cased and tracks them the renamed files in the originalFiles[] and renamedFiles[] arrays.
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);
    }
  });
}
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];
}
1308999
def rename_file(self, old_path, new_path):
        """"""
        if old_path not in self.paired_notebooks:
            try:
                # we do not know yet if this is a paired notebook (#190)
                # -> to get this information we open the notebook
                self.get(old_path, content=True)
            except Exception:
                pass

        if old_path not in self.paired_notebooks:
            super(TextFileContentsManager, self).rename_file(old_path, new_path)
            return

        fmt, formats = self.paired_notebooks.get(old_path)
        old_alt_paths = paired_paths(old_path, fmt, formats)

        # Is the new file name consistent with suffix?
        try:
            new_base = base_path(new_path, fmt)
        except Exception as err:
            raise HTTPError(400, str(err))

        for old_alt_path, alt_fmt in old_alt_paths:
            new_alt_path = full_path(new_base, alt_fmt)
            if self.exists(old_alt_path):
                super(TextFileContentsManager, self).rename_file(old_alt_path, new_alt_path)

        self.drop_paired_notebook(old_path)
        self.update_paired_notebooks(new_path, fmt, formats)
705255
public void updateAndRestart(ClassLoaderFiles files) {
		Set<URL> urls = new LinkedHashSet<>();
		Set<URL> classLoaderUrls = getClassLoaderUrls();
		for (SourceFolder folder : files.getSourceFolders()) {
			for (Entry<String, ClassLoaderFile> entry : folder.getFilesEntrySet()) {
				for (URL url : classLoaderUrls) {
					if (updateFileSystem(url, entry.getKey(), entry.getValue())) {
						urls.add(url);
					}
				}
			}
			urls.addAll(getMatchingUrls(classLoaderUrls, folder.getName()));
		}
		updateTimeStamp(urls);
		restart(urls, files);
	}
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);
  });
}
761650
function(changed) {
			$.each(changed, function(i, file) {
				var hash = file.hash;
				if (files[hash]) {
					$.each(Object.keys(files[hash]), function(i, v){
						if (typeof file[v] === 'undefined') {
							delete files[hash][v];
						}
					});
				}
				files[hash] = files[hash] ? Object.assign(files[hash], file) : file;
			});
		}
934431
def setFilenames( self, filenames ):
        
        mapped = []
        for filename in filenames:
            filename = nativestring(filename)
            if ( not filename ):
                continue
            
            mapped.append(filename)
            if ( len(mapped) == self.maximumLength() ):
                break
        
        self._filenames = mapped
        self.refresh()
404342
private function renamePathsForCreatedFiles(): void
    {
        foreach ($this->filesCreated as $key => $realPath) {
            $this->filesCreated[$key] = $this->pathHelper->renamePathBasenameSingularOrPlural(
                $realPath,
                $this->singularNamespacedName,
                $this->pluralNamespacedName
            );
        }
    }
468625
def rename_local_untracked(self):
        
        # Find what files have been added!
        new_upstream_files = self.find_upstream_changed('A')
        for f in new_upstream_files:
            if os.path.exists(f):
                # If there's a file extension, put the timestamp before that
                ts = datetime.datetime.now().strftime('__%Y%m%d%H%M%S')
                path_head, path_tail = os.path.split(f)
                path_tail = ts.join(os.path.splitext(path_tail))
                new_file_name = os.path.join(path_head, path_tail)
                os.rename(f, new_file_name)
                yield 'Renamed {} to {} to avoid conflict with upstream'.format(f, new_file_name)
990395
function rename(oldPath, newPath, callback) {
        appshell.fs.rename(oldPath, newPath, _wrap(callback));
    }
24879
public static void renameTo(File sourceFile, File destFile) {
        if (sourceFile.exists() && !destFile.exists()) {
            createFolder(destFile.getParent());
            sourceFile.renameTo(destFile);
        }
    }
94034
public function renameFile($fileIndex, $newFileName)
    {
        $fileIndex = (int)$fileIndex;
        foreach ($this->positions as $position) {
            $source = $position->source;
            if ($source->fileIndex === $fileIndex) {
                $source->fileName = $newFileName;
            }
        }
    }
286736
function(files, next) {
        var fromFile = files[0],
          toFile = files[1];

        differ(id, fromFile, toFile, next);
      }
528931
def update_log_filenames(self):
        """"""
        log_filenames = os.listdir(self.logs_dir)

        for log_filename in log_filenames:
            full_path = os.path.join(self.logs_dir, log_filename)
            if full_path not in self.log_filenames:
                self.log_filenames.add(full_path)
                self.closed_file_infos.append(
                    LogFileInfo(
                        filename=full_path,
                        size_when_last_opened=0,
                        file_position=0,
                        file_handle=None))
                logger.info("Beginning to track file {}".format(log_filename))
304650
private void rename(String from, String to) throws IOException
   {
      IndexOutputStream out = null;
      IndexInputStream in = null;
      try
      {
         out = new IndexOutputStream(dir.createOutput(to));
         in = new IndexInputStream(dir.openInput(from));
         DirectoryHelper.transfer(in, out);
      }
      finally
      {
         if (in != null)
         {
            in.close();
         }

         if (out != null)
         {
            out.flush();
            out.close();
         }
      }
      try
      {
         // delete old one
         if (dir.fileExists(from))
         {
            dir.deleteFile(from);
         }
      }
      catch (IOException e)
      {
         // do noting. Will be removed later
         if (LOG.isTraceEnabled())
         {
            LOG.trace("Can't deleted file: " + e.getMessage());
         }
      }
   }
1327525
private void upgradeIfNeeded(File oldPidGenDir) throws IOException {
        if (oldPidGenDir != null && oldPidGenDir.isDirectory()) {
            String[] names = oldPidGenDir.list();
            Arrays.sort(names);
            if (names.length > 0) {
                BufferedReader in =
                        new BufferedReader(new InputStreamReader(new FileInputStream(new File(oldPidGenDir,
                                                                                              names[names.length - 1]))));
                String lastLine = null;
                String line;
                while ((line = in.readLine()) != null) {
                    lastLine = line;
                }
                in.close();
                if (lastLine != null) {
                    String[] parts = lastLine.split("|");
                    if (parts.length == 2) {
                        neverGeneratePID(parts[0]);
                    }
                }
            }
        }
    }
1238064
void updateFileMonitor(Collection<String> filesToMonitor) {
        if (monitoredFiles.equals(filesToMonitor)) {
            return;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Updating FileMonitor with a new set of files to monitor: " + filesToMonitor);
        }

        monitoredFiles = filesToMonitor;

        Hashtable<String, Object> properties = getFileMonitorProperties();
        serviceRegistration.setProperties(properties);
    }