"Benjamin D. LeMasurier" <ui*****@uidzer0.org> wrote in message
news:9c**************************@posting.google.c om...
Hey everyone,
Is there a way to "watch" a file for changes?
I assume you mean changes made by some other process.
Otherwise your program already 'knows' when it changes
things.
I know I could poll the
file every few seconds and check to see if the buffer has changed but
is there a cleaner way?
Depending upon your operating system, probably yes. But
standard C doesn't recognize the notion of multiple processes,
shared files, etc. Those issues are the domain of the operating
system. Ask in a forum which discuss your host platform.
-Mike