MCPcopy Create free account
hub / github.com/anomalyco/opencode / tmpdir

Function tmpdir

packages/core/test/util/flock.test.ts:25–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23const worker = path.join(import.meta.dir, "../fixture/flock-worker.ts")
24
25async function tmpdir() {
26 const dir = await fs.mkdtemp(path.join(os.tmpdir(), "flock-test-"))
27 return {
28 path: dir,
29 async [Symbol.asyncDispose]() {
30 await fs.rm(dir, { recursive: true, force: true })
31 },
32 }
33}
34
35function lock(dir: string, key: string) {
36 return path.join(dir, Hash.fast(key) + ".lock")

Callers 1

flock.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected