MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / openLogContents

Function openLogContents

src/extension/utils.ts:261–266  ·  view source on GitHub ↗
(logType = `txt`, logContents: string, tempPath?: string)

Source from the content-addressed store, hash-verified

259};
260
261export async function openLogContents(logType = `txt`, logContents: string, tempPath?: string) {
262 if (!tempPath)
263 tempPath = path.join(os.tmpdir(), `log-${getRandomInt(0x1000, 0x10000).toString(16)}.${logType}`);
264 fs.writeFileSync(tempPath, logContents);
265 await workspace.openTextDocument(tempPath).then(window.showTextDocument);
266}
267
268/// Gets all excluded folders (full absolute paths) for a given workspace
269/// folder based on config.

Callers 5

constructorMethod · 0.90
runFlutterHelpFunction · 0.90
promptToReloadExtensionFunction · 0.85

Calls 2

getRandomIntFunction · 0.90
toStringMethod · 0.45

Tested by

no test coverage detected