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

Function tmpdir

lib/os.js:181–195  ·  view source on GitHub ↗

* @returns {string}

()

Source from the content-addressed store, hash-verified

179 * @returns {string}
180 */
181function tmpdir() {
182 if (isWindows) {
183 const path = process.env.TEMP ||
184 process.env.TMP ||
185 (process.env.SystemRoot || process.env.windir) + '\\temp';
186
187 if (path.length > 1 && path[path.length - 1] === '\\' && path[path.length - 2] !== ':') {
188 return StringPrototypeSlice(path, 0, -1);
189 }
190
191 return path;
192 }
193
194 return getTempDir() || '/tmp';
195}
196tmpdir[SymbolToPrimitive] = () => tmpdir();
197
198/**

Callers 4

os.jsFile · 0.85
setupCoverageFunction · 0.85
mainFunction · 0.85
mainFunction · 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…