📜  如何在javascript代码示例中创建目录

📅  最后修改于: 2022-03-11 15:01:59.190000             🧑  作者: Mango

代码示例1
const fs = require('fs');

// directory path
const dir = './views';

// create new directory
fs.mkdir(dir, (err) => {
    if (err) {
        throw err;
    }
    console.log("Directory is created.");
});