Answers for "node js check for folder existance and if not create folder in directory"

0

nodejs create folder if not exist

var fs = require('fs');
var dir = './tmp';

if (!fs.existsSync(dir)){
    fs.mkdirSync(dir);
}
Posted by: Guest on July-02-2021

Code answers related to "node js check for folder existance and if not create folder in directory"

Code answers related to "Javascript"

Browse Popular Code Answers by Language