Check out example codes for "c# list all files in a directory and subdirectory". It will help you in understanding the concepts better.
Code Example 1
string[] allfiles = Directory.GetFiles("path/to/dir", "*.*", SearchOption.AllDirectories);
Learn ReactJs, React Native from akashmittal.com