Recursively retrieves all file entries (not directories) for a directory tree
Traverses the entire directory structure starting from targetDirectory, returning fs.Dirent objects for all files found (excludes directories).
The path to the root directory to start traversal
An array of fs.Dirent objects for files only, or undefined if an error occurs
Recursively retrieves all file entries (not directories) for a directory tree
Traverses the entire directory structure starting from targetDirectory, returning fs.Dirent objects for all files found (excludes directories).