talideon.com

No, it’s just that I’m turning into a fish right now, and...

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.

Technorati Search Technorati Search Irish Bloggers

Comments

No comments.

Post a comment

All form information is optional, but it’s a good idea to fill in your name and email address if you want me to take your comment seriously.

Spammers, don’t bother posting crap down here. The site is set up so that legitimate search engines (Google, for instance) won’t index pages with comments on them. Posting crud here only means you’re wasting my time and patience. Shoo!

Real names, please. Please include!
Won’t be displayed. Please include!
Displayed, if present.