Check out example codes for "list all files in directory and subdirectories c#". It will help you in understanding the concepts better.

Code Example 1

string[] allfiles = Directory.GetFiles("path/to/dir", "*.*", SearchOption.AllDirectories);

Code Example 2

string[] entries = Directory.GetFileSystemEntries(path, "*", SearchOption.AllDirectories);

Learn ReactJs, React Native from akashmittal.com