Java periodically returning the newest files in subdirectories into one array
<p>I have a root folder, and it contains a number of sub-directories, and each sub-directory contains only xml files (no other directories).. I need to make a program that returns the newest files added in (in all of the sub-directories) to be able to send them to ftp subscribers..</p>

<p>what's the best way to do that ? </p>

<p>I am able to look through one directory and sort all its files but I don't know how to do it for multiple sub-directories..and I need only the newest files, if i return all the files it will slow down the program.</p>

<p>Also, I need this program to be executed periodically, do I have to include this in the method it self, or create an other class for that ?</p>
