nodejs - Temporary file name


Question

In node.js, how do I generate a unique temporary file name, a la mkstemp(3)? I want to atomically write a file using fs.rename.

1
33
3/23/2016 4:02:20 PM

Accepted Answer

Maybe you already found node-temp in the meantime.

21
9/14/2016 4:01:29 PM

Another popular package is tmp.


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon