var fs = require('fs');
const dir = './database/temp';
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir, {
recursive: true
});
}
import fs from "fs";
const fsp = fs.promises;
const makeDir = async () => {
try {
await fsp.mkdir('blogPost')
} catch (err) {
console.log(err);
}
}
makeDir()
const fs = require("fs");
if (!fs.existsSync(dirName)) fs.mkdirSync(dirName, { recursive: true });
//Include fs module
const fs = require('fs');
const dir = './dir'
fs.mkdir(dir);