in reply to Finding oldest file in directory

How about adding a test to see if the directory has changed before examining every file in the dir? If the dir hasn't updated, skip the test.

Replies are listed 'Best First'.
Re^2: Finding oldest file in directory
by Anonymous Monk on Oct 21, 2004 at 10:22 UTC
    Along the same lines, test what was the oldest file last time and if it hasn't changed, it is still the oldest file.