const { readdirSync } = require('fs')
const getDirectories = source =>
readdirSync(source, { withFileTypes: true })
.filter(dirent => dirent.isDirectory())
.map(dirent => dirent.name)
const getAllFromDir = source =>
fs.readdirSync(source).map(name => path.join(source, name));
console.log(getDirectories("C:/"));