Check out example codes for "asp.net list all files in folder". 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