I want to implement a function that enumerates all files in directory. I think the function should Return a Promise, because underlying readdir call is prefered over readdirSync. Be a generator function, because checking statSync(…).isFile() might take some time and maybe, I will need only first few files… So my attempt import * as fsRead more