remove all folder javascript code example
Example 1: nodejs fs delete non empty directory
var rimraf = require("rimraf");
rimraf("/some/directory", function () { console.log("done"); });
Example 2: nodejs fs delete non empty directory
rimraf.sync("/some/directory");