Creating and Using Temporary Files


What’s the proper (and cross-platform) way to create and use temporary files with Electron? Is there a clean way to do it through the fs module? I need to write the text of a script to a temporary file so that I can execute it using child_process.


To my understanding, there isn’t anything in the Node fs or path libraries for dealing with temp files or paths. If I remember correctly, I’ve mostly used the temp module.


Great, thank you.