MCPcopy Index your code
hub / github.com/deepnote/deepnote / createTempFile

Function createTempFile

packages/cli/src/commands/test-helpers.ts:11–16  ·  view source on GitHub ↗
(content: string, prefix = 'deepnote-test-')

Source from the content-addressed store, hash-verified

9 * Returns the absolute path to the created file.
10 */
11export async function createTempFile(content: string, prefix = 'deepnote-test-'): Promise<string> {
12 const tempDir = await fs.mkdtemp(join(os.tmpdir(), prefix))
13 const filePath = join(tempDir, 'test.deepnote')
14 await fs.writeFile(filePath, content, 'utf8')
15 return filePath
16}
17
18/**
19 * Clean up a temporary file and its parent directory.

Callers 4

cat.test.tsFile · 0.90
inspect.test.tsFile · 0.90
stats.test.tsFile · 0.90
validate.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected