how to delete directory in nodejs code example
Example 1: delete dir nodejs
fs.rmdirSync(dir, { recursive: true });
Example 2: nodejs fs delete non empty directory
rimraf.sync("/some/directory");
fs.rmdirSync(dir, { recursive: true });
rimraf.sync("/some/directory");