MCPcopy
hub / github.com/shelljs/shelljs / tmpFile

Function tmpFile

test/touch.js:28–35  ·  view source on GitHub ↗
(t, noCreate)

Source from the content-addressed store, hash-verified

26}
27
28function tmpFile(t, noCreate) {
29 const str = crypto.randomBytes(Math.ceil(10 / 2)).toString('hex');
30 const file = `${t.context.tmp}/${str}`;
31 if (!noCreate) {
32 fs.closeSync(fs.openSync(file, 'a'));
33 }
34 return file;
35}
36
37
38//

Callers 1

touch.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…