native-toolkit/simplefilewatcher

Name: simplefilewatcher

Owner: native-toolkit

Description: null

Created: 2017-09-25 21:11:27.0

Updated: 2017-09-25 21:23:11.0

Pushed: 2017-09-25 21:23:09.0

Homepage: null

Size: 14

Language: C++

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

simplefilewatcher

Description:

FileWatcher is a C++ wrapper for OS file monitoring systems. Currently it uses Win32 ReadDirectoryChangesW for monitoring changes in Windows, and inotify in linux. OSX is supported via kqueue and directory scans.

TODO:

Compiling:

Build scripts for Visual Studio 2005, Visual Studio 2008, and GNU Make can be found within the build directory, or can be regenerated using premake 4.0.

SimpleDemo:

To run the demo, create a directory relative to the execution directory called “test”. Start SimpleDemo, then create/change/delete files inside “test”. If “test” does not exist when SimpleDemo starts, it will throw an exception and exit.

OgreDemo:

Check the OgreDemo directory for an example integration with Ogre.

Caveats:

When some programs write data in Win32, they will generate both an Add, and a Modify event. This is likely because the program is actually using two separate calls to write its data.

Because of the time it takes to write the data to the file, it may be necessary in some cases to wait a few milliseconds after the event to be able to safely access the file's contents.


Written by James Wynn Contact: james@jameswynn.com

The most recent version can be located at: http://simplefilewatcher.googlecode.com


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.