SimpleFileWatcher: New version

Just released a new version of SimpleFileWatcher. Not a lot of new content, but a pretty serious bug was fixed for Win32 and some better error handling. I create some more maintainable build scripts using premake. Also, I moved the OgreDemo off to its own directory to help contain all the files.

Download: SimpleFileWatcher 2009.09.14

4 thoughts on “SimpleFileWatcher: New version

  1. geronimo22 say:

    hi there, i am trying to use your library for a project. I keep getting error:
    ../../source/FileWatcherLinux.cpp: In member function ‘virtual void FW::FileWatcherLinux::update()’:
    ../../source/FileWatcherLinux.cpp:147:36: error: ‘read’ was not declared in this scope
    len = read (mFD, buff, BUFF_SIZE);

    I am using gcc version 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC) .

    Including #include in FileWatcherLinux fixes the issues, but I am not sure if that will have any other side effects?

    I had 2 more questions:
    1. My app needs to continuously watch for file modifications. Does that mean I will have to keep calling update() in a while loop?
    2. Does the read() call, block the thread and keep the CPU busy? Or does the thread go to sleep and “wakes” up only when an event comes in?

  2. geronimo22 say:

    sorry, i meant …. Including unistd.h in FileWatcherLinux fixes the issues,

Leave a Reply

Your email address will not be published. Required fields are marked *

nineteen + 5 =