For this homework assignment, you will create a class that finds all the valid files (not directories) that end in the .txt or .text extension case-insensitive. You must use streams and lambda functions for this assignment. You cannot use the File class in Java! See the Javadoc comments in the template code for additional details.
The official name of this homework is TextFileFinder. This should be the name you use for your Eclipse Java project and the name you use when running the homework test script.
See the Homework Guides for additional details on homework requirements and submission.
Below are some hints that may help with this homework assignment:
-
If you are more comfortable with anonymous classes and the
Fileclass, start there. You will fail some of the tests, but you will be able to see whether you are finding the expected text files. Then, convert one thing at a time to use what is required. -
Check out the
Filesclass in Java. Thewalk(...)andfind(...)methods will be helpful here. -
Use the
FileVisitOption.FOLLOW_LINKSoption when using thewalk(...)orfind(...)method. (This is important mostly for the project later.)
You are not required to use these hints in your solution. There may be multiple approaches to solving this homework.