Remove a directory (folder) (rmdir)



examples/fs/remove_directory.js
const fs = require('fs');

fs.rmdir(dirname, (err) => {
    if (err) {
        console.log(err);
    } else {
        console.log('Success');
    }
});