View Full Version : very simple and basic FAM/Gamin wrapper for qt

8th April 2008, 12:46
Since QFileSystemWatcher is very basic (because it is supposed to be platform-independent) I wrote a very simple layer for Fam. It's probably full of bugs and disrespects one of the main goals of Qt, that is Platform-independence. It may however be useful to some users that don't need platform-independence. It should work on all Unixes that support Fam/Gamin. I tested it on linux. The respective files that you should include in your project are:


FileSystemWatcher looks a little like QFileSystemWatcher. It has the same accessor functions to add files to be monitored and remove them again. It emits the same signals as QFileSystemWatcher would do, namely:
fileChanged(const QString&), directoryChanged(const QString&). Furthermore it emits an additional signal that provides a FileSystemEvent object that can be used to query details about what was going on.

I've provided a simple test application 2162 to test the classes. The classes are only a few days old, lack documentation, probably contain plenty of bugs and is still somewhat inconsistent with QFileSystemWatchers behaviour. For Instance, deleting a monitored file does not remove it from fam/gamin. so when it gets recreated it is still watched. I'll probably change that soon though.

It'd be nice if someone could give me some feedback about it :)

The tarball containing both test application and the classes can be fetched from here:
http://www.informatik.uni-bremen.de/~momesana/fam-qt.tar.bz2 (http://www.informatik.uni-bremen.de/%7Emomesana/fam-qt.tar.bz2)

Thanx in advance