changeOpenedFilePath (pathname, oldPathname) {
    const { _openedFiles, browserWindow } = this
    const index = _openedFiles.findIndex(p => p === oldPathname)
    if (index === -1) {
      // The old path was not found but add the new one.
      _openedFiles.push(pathname)
    } else {
      _openedFiles[index] = pathname
    }
    ipcMain.emit('watcher-unwatch-file', browserWindow, oldPathname)
    ipcMain.emit('watcher-watch-file', browserWindow, pathname)
  }
Change a path in the opened file list and update the watcher.

@param {string} pathname
@param {string} oldPathname