MCPcopy Index your code
hub / github.com/REditorSupport/vscode-R / updateWorkspace

Function updateWorkspace

src/session.ts:204–223  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

202}
203
204async 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
225export async function showBrowser(url: string, title: string, viewer: string | boolean): Promise<void> {
226 console.info(`[showBrowser] uri: ${url}, viewer: ${viewer.toString()}`);

Callers 1

updateSessionWatcherFunction · 0.85

Calls 3

isLiveShareFunction · 0.90
notifyWorkspaceMethod · 0.80
refreshMethod · 0.65

Tested by

no test coverage detected