July 2018
Intermediate to advanced
242 pages
8h 6m
English
In this recipe, we are going to explore how to traverse files in a given directory. We are going to obtain a FileTreeWalk class instance from a given File pointing to the directory. We are going to iterate through all the files inside the given directory, including any nested subdirectories. We will also filter the files to exclude those without the .txt extension and print their paths and contents to the console.
Read now
Unlock full access