Probably you mean "most recent file". Most recently created or most recently written?
After you get all files in question in the form of the instance of
, you can use
(depending on what time do you need) and compare time. Please see:
Remember that the time resolution is not high, it's a millisecond. Please see:
By the way, many are confused about how to compare the instances of
. The answer is simple: use the operator "<" or ">". Please see: