(logType = `txt`, logContents: string, tempPath?: string)
| 259 | }; |
| 260 | |
| 261 | export 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. |
no test coverage detected