Node readdirSync and getting paths dynamically

45 Views Asked by At

I have a directory whose contents shrink and grow. I am trying to run a program that will list all the directories.

Is there a way for fs.readdirSync to be fed a path like ./src/images/*/*/* and it would list all the paths within that wildcard structure?

The only alternative I can see is creating some complex nested loops.

0

There are 0 best solutions below