= Windows File System Observer =
The WindowsFileSystemObserver project is an open-source project providing file system observations (currently only for Windows OS).
It observes the following file/folder operations: create, delete, move, and rename files/folders.
This project uses [http://www.teamdev.com/jniwrapper/ JNIWrapper], a commercial product.
DFKI has got a developer license; the WindowsFileSystemObserver project is shipped with a free runtime license.
== Getting the code ==
Check out the project from this SVN repository:
{{{
https://usercontext.opendfki.de/repos/trunk/WindowsFileSystemObserver
}}}
== Starting ==
You have 3 alternative ways of starting the file system observer:
* Start this batch file: [source:trunk/WindowsFileSystemObserver/Launch_WindowsFileSystemObserver.bat Launch_WindowsFileSystemObserver.bat]
* Start this main class as Java application (from inside eclipse): [source:trunk/WindowsFileSystemObserver/src/observer/de/dfki/km/filesysobservation/standalone/StandaloneWindowsFileSystemObservation.java StandaloneWindowsFileSystemObservation]
* Use this launch configuration (from inside eclipse): [source:trunk/WindowsFileSystemObserver/WindowsFileSysObservation.launch WindowsFileSysObservation.launch]
== Configuring ==
Wenn first starting the file observer it opens up the config dialog which allows to add the file folders to observe.
You can use the [Add] button to add file folders to observe (subfolders are also observed).
After having added some file folders the dialog will look like this:
[[Image(filesysobserver-config.png)]]
The file system observer provides an MBean interface you can access via the Java console ({{{jconsole}}}):
[[Image(filesysobserver-jconsole.png)]]
So, if you close the config dialog once, you can open it up again by using the {{{jconsole}}} and invoke the [{{{configure}}}] method.
Alternatively, you can also invoke [{{{addFolderToObserve}}}].
== Testing ==
The file system observer creates NOPs of the observed file operations and passes them to the (hopefully running!) User Observation Hub.
Please keep in mind, that ALL file operations are observed and passed. That means: not only the file operations explicitly invoked by the user but also file operations done by the system or by applications are processed.
In other words, if you configure to observe the whole hard disk (e.g. {{{C:\}}}) then you will get really A LOT of NOPs. For example, Mozilla Thunderbird creates and modifies really A LOT of files when running!
Test this:
* Create a new text file
* Rename it to {{{NewTestDocument.txt}}}
What happens is, that Windows creates a file named {{{Neu%20Textdokument.txt}}} (german Windows XP).
After renaming the file (by you) it seems, that the file system observer recognizes an additional {{{FileSave}}} operation.
Altogether this results in the following three NOPs being sent to the User Observation Hub:
{{{
2008-06-20T14:21:56.125+02:00
2008-06-20T14:22:01.890+02:00
2008-06-20T14:22:04.062+02:00
}}}