Simple Directory problem

Thread Starter


Joined Apr 13, 2011
Anybody have a good reference for file handling in Java?

I have an assignment where, given a directory, I have to print all the files (excluding directories) and files within directories of that directory (etc and going deeper until all subfiles are displayed) with paths in order of last modified.

I created the dynamic array that will hold the strings that are the paths for each file and we are allowed to use comparable for the date modified. I really just don't know how to retrieve all the files, and especially how to get those subfiles. Any good starting points?