()
| 180 | } |
| 181 | |
| 182 | async function updatePlot() { |
| 183 | console.info(`[updatePlot] ${plotFile}`); |
| 184 | const lockContent = await fs.readFile(plotLockFile, 'utf8'); |
| 185 | const newTimeStamp = Number.parseFloat(lockContent); |
| 186 | if (newTimeStamp !== plotTimeStamp) { |
| 187 | plotTimeStamp = newTimeStamp; |
| 188 | if (fs.existsSync(plotFile) && fs.statSync(plotFile).size > 0) { |
| 189 | void commands.executeCommand('vscode.open', Uri.file(plotFile), { |
| 190 | preserveFocus: true, |
| 191 | preview: true, |
| 192 | viewColumn: ViewColumn[(config().get<string>('session.viewers.viewColumn.plot') || 'Two') as keyof typeof ViewColumn], |
| 193 | }); |
| 194 | console.info('[updatePlot] Done'); |
| 195 | if (isLiveShare()) { |
| 196 | void rHostService?.notifyPlot(plotFile); |
| 197 | } |
| 198 | } else { |
| 199 | console.info('[updatePlot] File not found'); |
| 200 | } |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | async function updateWorkspace() { |
| 205 | console.info(`[updateWorkspace] ${workspaceFile}`); |
no test coverage detected