Possible Duplicate:
get last modified file in a dir?
I have a folder which contents more than 30000 subfolders in it. How can I get a list of subfolders with last modification date >= one hour ago? Is it possible to do that without getting a list of all files in an array and sorting it? I cannot use a readdir
function because it returns files in the order in which they are stored by the filesystem and exhaustive search of the list of files will take a very long time.