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

Function warnOnNonPortableTemplate

lib/internal/fs/utils.js:886–896  ·  view source on GitHub ↗
(template)

Source from the content-addressed store, hash-verified

884let nonPortableTemplateWarn = true;
885
886function warnOnNonPortableTemplate(template) {
887 // Template strings passed to the mkdtemp() family of functions should not
888 // end with 'X' because they are handled inconsistently across platforms.
889 if (nonPortableTemplateWarn &&
890 ((typeof template === 'string' && StringPrototypeEndsWith(template, 'X')) ||
891 (typeof template !== 'string' && TypedArrayPrototypeAt(template, -1) === 0x58))) {
892 process.emitWarning('mkdtemp() templates ending with X are not portable. ' +
893 'For details see: https://nodejs.org/api/fs.html');
894 nonPortableTemplateWarn = false;
895 }
896}
897
898const defaultCpOptions = {
899 dereference: false,

Callers 5

mkdtempFunction · 0.85
mkdtempSyncFunction · 0.85
mkdtempDisposableSyncFunction · 0.85
mkdtempFunction · 0.85
mkdtempDisposableFunction · 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…