* Find all the files in the filesystem subtree rooted at folder. Writing the individual methods for these substeps, we’ll find ourselves writing a lot of low-level iteration code.įor example, here’s what the recursive traversal of the project folder might look like: /**
restrict them to files with a particular suffix, in this case.find all the files in the project, by scanning recursively from the project’s root folder.
Suppose we’re given the following problem: write a method that finds the words in the Java files in your project.įollowing good practice, we break it down into several simpler steps and write a method for each one: