MCPcopy Index your code
hub / github.com/nodejs/node / mkdtempSync

Function mkdtempSync

lib/fs.js:3589–3601  ·  view source on GitHub ↗

* Synchronously creates a unique temporary directory. * @param {string | Buffer | URL} prefix * @param {string | { encoding?: string; }} [options] * @returns {string}

(prefix, options)

Source from the content-addressed store, hash-verified

3587 * @returns {string}
3588 */
3589function mkdtempSync(prefix, options) {
3590 const h = vfsState.handlers;
3591 if (h !== null) {
3592 const result = h.mkdtempSync(prefix, options);
3593 if (result !== undefined) return result;
3594 }
3595
3596 options = getOptions(options);
3597
3598 prefix = getValidatedPath(prefix, 'prefix');
3599 warnOnNonPortableTemplate(prefix);
3600 return binding.mkdtemp(prefix, options.encoding);
3601}
3602
3603/**
3604 * Synchronously creates a unique temporary directory.

Callers 1

mainFunction · 0.50

Calls 4

mkdtempSyncMethod · 0.80
mkdtempMethod · 0.80
getOptionsFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…