ModeShape/modeshape — pull request #1066 by hchiorean (2014-02-28 14:33:26+00:00)
Title: MODE-2040 Added support for monitoring the filesystem for the FileSystemConnector.

This is turned on via the `monitoringEnabled` connector configuration setting. By default, monitoring is not enabled.

Also, please not that the `WatchService` implementation is *highly OS dependent* and therefore there may be significant differences - especially in the MODIFY events - between OSes. Also, there may be OSes where it is not supported at all.

Compared to the standard JCR event mechanism, it has the following limitations/differences:
* JCR does not have a "node changed" event, only PROPERTY_CHANGED. Therefore, the connector will only handle file modifications and send out 2 events: one for the LAST_MODIFIED and one for the BINARY property, which seem to be most consistent across OSes.
* there is no way to tell RENAMEs and MOVES from what the current `WatchService` offers.
* when a DELETE event occurs on the FS, the type of the deleted item (file/folder) cannot be determined because it does not exist anymore. The connector will fire the delete event with `hierarchyNode` in this
case.