Java equivalent of Linux 'find' function
Hello all. I hope you can all help me find an answer to my question.
I am looking for a Java equivalent to the 'find' command in Linux. Basically something that when given a directory it goes and finds everything underneath that directory recursively.
Is there any sort of pre-existing class in the JDK that can do that?
I have been looking around at the 1.6 API. In particular in java.io which is where I thought I might find something like this but so far I have found nothing that fits my needs.
For some additional info I need to generate a list of the complete filepaths of each file beneath a certain directory. Sometimes the files will be more than one directory deep so it needs to be recursive.
Any suggestions would be helpful. If I had to code something like this myself I don't know where I would start. If I have to code it myself though then I will.