The sync version of tmp just for test cases, making it much easier.
OTHER License
The sync version of tmp just for test cases, making our life it much easier.
I got tired of write asynchronous codes of tmp
even just in test cases.
Only use this package in your test cases, not in production environment for you should always using asynchronous fs.
var tmp = require('tmp-sync');
path=
the root path for the temp directory (optional, default to OS tmp directory)Makes a temp dir inside root
and returns the newly created dir. The dir will be automatically tmp.mark()
ed.
path
the path of a directoryMarks a dir, and the dir will be removed when the current process exits.
Cleans all marked tmp dirs. Most usually you need not to call this method manually.