MCPcopy
hub / github.com/anomalyco/opencode / tmpdir

Function tmpdir

packages/core/test/fixture/tmpdir.ts:5–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import path from "path"
4
5export const tmpdir = async () => {
6 const dir = await fs.realpath(await fs.mkdtemp(path.join(osTmpdir(), "opencode-core-test-")))
7 return {
8 path: dir,
9 async [Symbol.asyncDispose]() {
10 await remove(dir)
11 },
12 }
13}
14
15async function remove(dir: string, retries = 30): Promise<void> {
16 try {

Callers 15

skill.test.tsFile · 0.90
npm-config.test.tsFile · 0.90
withTmpFunction · 0.90
pullFunction · 0.90
withStoreFunction · 0.90
tool-write.test.tsFile · 0.90

Calls

no outgoing calls

Tested by 10

withTmpFunction · 0.72
pullFunction · 0.72
withStoreFunction · 0.72
withTmpFunction · 0.72
withRemoteFunction · 0.72
withTmpFunction · 0.72
withRemoteFunction · 0.72
setupFunction · 0.72
withTmpFunction · 0.72
withTmpFunction · 0.72