It's me again. I need some help with my programming homework again. This time around, the teacher didn't give us any idea how to do this, and expected us to scour the API. However, I've been looking all up and down the thing, and I can't find anything that would help me figure this out.
We need to write a program that accepts a path, file name, extension type, and a String to check the content. It uses all of these parameters, skipping whatever the user leaves blank, to search for a file that matches, and uses recursion to check folders inside the folder being searched currently.
I've gotten everything done, except for checking file content. I can't find anything on how to check inside of the file being searched for a matching sample of text. The assignment was actually due yesterday, but I held off on turning it in because I wanted to get it fully working. At this point, though, I'm about ready to give up.
I figured I'd ask for help for this last part, and if nobody can help me by the time I get out of class tomorrow, I'll just turn it in as-is. If anybody knows enough to help me out though, I'd really like to get the last bit working before I turn it in. (My teacher's unusually accepting when it comes to late work, as long as it's "reasonably" late.)
Does anybody know how to compare a text file's contents against a String that the user provides?