So far in this chapter, we took a look at many of the functionalities provided by the filesystem library, such as working with paths, performing operations with files and directories (creating, moving, renaming, deleting, and so on), and querying or modifying properties. Another useful functionality when working with the filesystem is to iterate through the content of a directory. The file library provides two directory iterators, one called directory_iterator that iterates the content of a directory, and one called recursive_directory_iterator that iterates recursively the content of a directory and its subdirectories. In this recipe, we will see how to use these.
Enumerating the content of a directory
Getting ready
In this recipe, we will work with filesystem...