To access a directory, and the files within it, is a very compiler/OS specific task. It's not practicable to show how to do this for all variations, so here are some examples for various compilers.
Read.