Synchronous version of mkTemp. Creates a temporary file or directory.
mkTemp
Optional
Optional temp options (e.g., isDirectory, basename, extname).
An IOResult containing the temporary path.
IOResult
mkTemp for the async version.
1.7.0
mkTempSync({ extname: '.txt' }) .inspect(path => console.log('Temp file:', path)); Copy
mkTempSync({ extname: '.txt' }) .inspect(path => console.log('Temp file:', path));
Synchronous version of
mkTemp. Creates a temporary file or directory.