I need to read all files in a directory every say 5 minutes and check if any new files have been created.
What would be the best way to do this?
I thought of using a DB to store all file names and then compare one by one but it seems like it would take too long.
I also thought of writing the file names to a text file and the looking if the file name is on the list or not.
Is there a better way?