How to get the latest file name, or the file path that is added into a directory?
Enumerate all directory files, get the filemtime() of each and you are done.