MCPcopy
hub / github.com/google/zx / tempdir

Function tempdir

src/goods.ts:49–57  ·  view source on GitHub ↗
(
  prefix: string = `zx-${randomId()}`,
  mode?: Mode
)

Source from the content-addressed store, hash-verified

47export { versions } from './versions.ts'
48
49export function tempdir(
50 prefix: string = `zx-${randomId()}`,
51 mode?: Mode
52): string {
53 const dirpath = path.join(os.tmpdir(), prefix)
54 fs.mkdirSync(dirpath, { recursive: true, mode })
55
56 return dirpath
57}
58
59export function tempfile(
60 name?: string,

Callers 5

goods.test.tsFile · 0.90
core.test.jsFile · 0.85
build-npm.test.jsFile · 0.85
build-jsr.test.jsFile · 0.85
tempfileFunction · 0.85

Calls 1

randomIdFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…