i was given some psuedocode to get me going but I can't figure it all out. the extension is assigned to the variable "ext"
If f.isFile() is true, then
If f.getPath() ends with the extension, then
Add f.getPath() to the foundFiles array list
Return // this is the end of recursion
Else // This must be a directory
For each subFile in f.listFiles() // This gets all the files in the directory
Call findMatchingFiles(subFile) // This is the recursive call
this is what I have so far and can't seem to fill in the blanks. any tips or help is greatly appreciated.
public void findMatchingFiles(File f) {
if (f.isFile() == true) {
if () {
foundFiles.add(f.getPath());
}
return;
} else {
for ( : ) {
findMatchingFiles(subFile);
}
}
}
}