I was wondering what is considered the best technique for determining if
you have new files in a directory as I can think of a couple but they
don't seem that elegant. I recall that there as a real good way to do
this but I have forgotten (signals maybe?). What have others done?
Some idea's are:
1. Every so often(use timer/sleep) get the modified date on all files in
a directory keeping track of the last time you did it and process the
ones with a greater date (use stat or directly read the directory
file?).
2. Instead of a program(C/C++) use a shell to do the same thing.