Exercise: List Files Recursively

Practice how to write an asynchronous function that returns the list of the files that are in the directory and subdirectories.

Problem statement

Write a listNestedFiles() named callback-style function that takes, as the input, the path to a directory in the local filesystem and that asynchronously iterates over all the subdirectories to eventually return a list of all the files discovered. Here’s what the signature of the function should look like:

Get hands-on with 1200+ tech skills courses.