Thread: recieve signal when file written to

  1. #1
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946

    recieve signal when file written to

    Hi. I would like to have my program watch over a particular file, and then recieve a signal (to probably wake a sleeping thread) when that file is written to by any other program.

    Something like FileSystemWatcher http://msdn.microsoft.com/library/de...components.asp only in C, would be what I'm looking for.
    hello, internet!

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Look up the function FindFirstChangeNotification() in the win32 API. The documentation of that function, and related ones, should be enough to get you started

  3. #3
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    Perfect, did exactly what I needed. Thank you
    hello, internet!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems passing a file pointer to functions
    By smitchell in forum C Programming
    Replies: 4
    Last Post: 09-30-2008, 02:29 PM
  2. Formatting the contents of a text file
    By dagorsul in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2008, 12:36 PM
  3. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  4. Reading a file written by VB
    By nemaroller in forum C++ Programming
    Replies: 8
    Last Post: 07-12-2002, 11:17 PM
  5. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM