To list all files and subdirectories in a folder on Mac, one can use the -R flag with the traditional ls command.
Alternatively, one can copy the folder's contents and paste it into a plain text document in a program such as TextEdit.
To list all files recursively from the command line, you can attach the -R flag to the traditional ls command. This expands out subdirectories and lists the files contained within them. These commands will work in just about all forms of unix, from Mac OS X to Linux or whatever else you may encounter.
How to List All Files and Subdirectory Contents in a Folder on Mac
Besides third-party solutions, the only easy solution in OS X is to copy a folder's contents and paste it into a plain text document in a program such as TextEdit.
To do this, open the desired folder you want to list the contents of, and select all items (command-A) then copy them (command-C) and open TextEdit.
Terminal fun: Options for printing folder and subfolder contents - CNET
We've got the answers on how to find all the files on your Mac, including the sneaky ... as it contains all the necessary files needed for use by the macOS.
How to view all files on your Mac