Stdio.File()->notify

Pontus Östlund <[email protected]>
Newsgroups gmane.comp.lang.pike.user
Message-ID <CAAyMhKygXKMa0O33jPrtAQGMxavCPYW_Q966wUNS0Kc9rjR8tQ@mail.gmail.com>
Hello!

I have a question about the notify method in Stdio.File which I can't get
to work. Maybe I'm using it wrong or maybe it just doesn't work, I don't
know.

I'd like to listen for changes in a directory:

Stdio.File dir = Stdio.File("/my/dir");
dir->notify(
    Stdio.DN_MULTISHOT |
    Stdio.DN_MODIFY |
    Stdio.DN_CREATE |
    Stdio.DN_DELETE |
    Stdio.DN_RENAME,
    lambda() {
        werror("Hello\n");
    }
);

but nothing seems to happen. Am I doing something wrong?

And yes, I'm using Linux.

Regards
# Pontus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.