tmpdir
method of OS
module of node.js
This method is used to get the default directory for temporary files in operating system.
This method returns String
. Code snippet is given below :
//Name of the file: tmpdir.js
var os = require('os');
var value = os.tmpdir();
console.log("os.tmpdir() => " + value);
>node tmpdir.js
os.tmpdir() => C:\Users\acer\AppData\Local\Temp