Hello.
In node fs.readdirSync not traverse all directory tree.
In @skpm version fs.readdirSync uses NSFileManagersubpathsAtPath: which according to the documentation:
"This method recurses the specified directory and its subdirectories. The method skips the “.” and “..” directories at each level of the recursion."