()
| 202 | } |
| 203 | |
| 204 | async function updateWorkspace() { |
| 205 | console.info(`[updateWorkspace] ${workspaceFile}`); |
| 206 | |
| 207 | const lockContent = await fs.readFile(workspaceLockFile, 'utf8'); |
| 208 | const newTimeStamp = Number.parseFloat(lockContent); |
| 209 | if (newTimeStamp !== workspaceTimeStamp) { |
| 210 | workspaceTimeStamp = newTimeStamp; |
| 211 | if (fs.existsSync(workspaceFile)) { |
| 212 | const content = await fs.readFile(workspaceFile, 'utf8'); |
| 213 | workspaceData = JSON.parse(content) as WorkspaceData; |
| 214 | void rWorkspace?.refresh(); |
| 215 | console.info('[updateWorkspace] Done'); |
| 216 | if (isLiveShare()) { |
| 217 | rHostService?.notifyWorkspace(workspaceData); |
| 218 | } |
| 219 | } else { |
| 220 | console.info('[updateWorkspace] File not found'); |
| 221 | } |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | export async function showBrowser(url: string, title: string, viewer: string | boolean): Promise<void> { |
| 226 | console.info(`[showBrowser] uri: ${url}, viewer: ${viewer.toString()}`); |
no test coverage detected