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

Function mkdtemp

lib/internal/fs/promises.js:2021–2038  ·  view source on GitHub ↗
(prefix, options)

Source from the content-addressed store, hash-verified

2019}
2020
2021async function mkdtemp(prefix, options) {
2022 const h = vfsState.handlers;
2023 if (h !== null) {
2024 const promise = h.mkdtemp(prefix, options);
2025 if (promise !== undefined) return await promise;
2026 }
2027
2028 options = getOptions(options);
2029
2030 prefix = getValidatedPath(prefix, 'prefix');
2031 warnOnNonPortableTemplate(prefix);
2032
2033 return await PromisePrototypeThen(
2034 binding.mkdtemp(prefix, options.encoding, kUsePromises),
2035 undefined,
2036 handleErrorFromBinding,
2037 );
2038}
2039
2040async function mkdtempDisposable(prefix, options) {
2041 options = getOptions(options);

Callers

nothing calls this directly

Calls 3

mkdtempMethod · 0.80
getOptionsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…