Accessing a directory and getting the list of directories and files within it is not the difficult part, for luckily the .NET Framework provides us with a beautiful Directory class that takes care of that for us. The interesting part is accessing subdirectories, and their subdirectories, and their subdirectories. So, how do we know when to stop? Well, we don’t. That is when recursion kicks in.