Any simple API coding to get latest version of all files in a folder?

I'm writing an add-in to some process. In between I need to get latest version of all files in a particular folder. Is there any way to achieve that?

Thanks