October 6, 2004 at 10:15PM Listening for file updates on Windows
I’d really like to know if there’s a way to set up a callback of some kind or variety that would allow a program to be informed of when a certain file is updated. Not just any file, but a particular file.
I’ve taken a look through MSDN, disorganised heap that it is, without the slightest bit of luck. If anybody out there knows how, I’d love if somebody’d contact me and tell me. I don’t want to have to run a thread that would cycle through a list of files, checking to see if their datestamps have changed, which is the alternative.
I know the is possible on Linux and a few other nixen, but I need this in Windows.
I’m going to hack my comments system back into working tonight, along with a few other changes to the system, and I hope to have it back running tomorrow morning (UTC).
Update: I’m after finding this article and this one that mention fileio/base/findfirstchangenotification.asp FindFirstChangeNotification. Now there’s an system call that could do with a more obvous name, maybe CreateFileChangeNotificationEvent or something.
No comments.