MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / makeTempDir

Function makeTempDir

packages/node-runtime/src/data-dir-switch.test.ts:16–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14import { applyPendingNodeDataDirMigrationIfNeeded, NodePathProvider } from './node-path-provider'
15
16function makeTempDir(): string {
17 const baseDir = fs.existsSync('/private/tmp') ? '/private/tmp' : os.tmpdir()
18 return fs.mkdtempSync(path.join(baseDir, 'chatlab-data-switch-'))
19}
20
21function writeFile(filePath: string, content = 'data'): void {
22 fs.mkdirSync(path.dirname(filePath), { recursive: true })

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected