[erlang-questions] gen_event streamer
Wed Dec 15 02:29:26 CET 2010
If You are planning on using linux take a look at
an erlang interface to inotify.
On Tue, Dec 14, 2010 at 5:36 PM, Marcel Meyer <> wrote:
> Hi there,
> I would like to request your guidance in the following scenario where I want
> to follow OTP conventions:
> I want to mount a process on a directory that fires an event when files get
> added or deleted. I thought the API should look like this:
> fs_watcher:add_handler("/User/marcel/downloads/", pid).
> fs_watcher:add_handler("/User/john/downloads/", pid).
> Now I'm thinking that there should be 1 supervisor that keeps a process for
> each folder alive and sends a message to pid every time something happens in
> that folder, so in my example above, there would be 2 processes being kept
> Am I talking about the server/streamer part of the gen_event?
> Or do I need to roll my own by stitching an app/sup together that manage the
> spawned directory processes?
More information about the erlang-questions