User Tools

Site Tools


njsetn:directory_creation
var fs = require("fs");

if ( fs.existsSync("lib") ){
  console.log("Directory already there");
} else {
  fs.mkdir("lib", function(error) {
    if (error) { console.log(error); }
    else { console.log("directory Created"); }
  }
}
njsetn/directory_creation.txt · Last modified: 2016/03/23 22:05 by leo