[erlang-questions] Monitoring changes in a directory tree

Richard Carlsson <>
Sun Sep 21 22:52:46 CEST 2008

James Hague wrote:
> Has anyone put together a module for monitoring changes in directory
> tree?  If a file is changed, added, or deleted, I want to receive a
> message about it.  The code for this is very different under OS X and
> Windows, so having a nice cross-platform module would be wonderful.
> Or is there a standalone utility I can spawn and get notifications from?

There is a module file_monitor.erl that currently lives in the EUnit
repository (I've been meaning to put it somewhere more suitable and
make it more official, but that hasn't happened yet). It currently
only does polling - so it's portable at least - and it has no builtin
function for monitoring a whole tree, so you have to do the traversal
yourself to monitor subdirectories.



More information about the erlang-questions mailing list