A way to filter out those directories which need administration permission.
fs.readdirSync(currentPath, { withFileTypes: true }).forEach(element => {
....
})
Still shows all directories. Even those that need admin permission to be read/written to etc.