MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / deleteTempDirs

Function deleteTempDirs

src/platform/common/temp.ts:38–49  ·  view source on GitHub ↗
(context: IExtensionContext)

Source from the content-addressed store, hash-verified

36}
37
38export async function deleteTempDirs(context: IExtensionContext) {
39 try {
40 const dirs = await workspace.fs.readDirectory(context.globalStorageUri);
41 await Promise.all(
42 dirs
43 .filter(([name, type]) => name.startsWith(TEMP_DIR_PREFIX) && type === FileType.Directory)
44 .map(([dir]) => workspace.fs.delete(Uri.joinPath(context.globalStorageUri, dir), { recursive: true }))
45 ).catch(noop);
46 } catch {
47 //
48 }
49}

Callers 1

addClearCacheCommandFunction · 0.90

Calls 5

mapMethod · 0.80
filterMethod · 0.80
deleteMethod · 0.65
joinPathMethod · 0.65
allMethod · 0.45

Tested by

no test coverage detected