Closed daurnimator closed 13 years ago
Hello,
I'm a bit confused, since you titled this as "You can't watch directories", but the code sample is trying to monitor stdin (if I'm reading it correctly), but stdin is not a directory. FWIW, some of the test code in lua-ev tests that registering for stdin for WRITE's works:
https://github.com/brimworks/lua-ev/blob/master/test/test_ev_io.lua
Note that the code hard-codes a 1 for stdin.
Its trying to watch the current working directory (cwd) (via io.open(".") ) on my computer getfd is returning 4 for it.
Crap, didn't mean to close the bug.
It sounds like you want a "stat" watcher (which unfortunately isn't implemented yet, but adding support for this in lua-ev should be trivial):
http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#code_ev_stat_code_did_the_file_attri
Cheers, -Brian
Hi daurnimator,
Did you want the stat() watcher implemented? Or did you want something else? If this request is no longer valid, then I would like to close the issue.
Thanks, -Brian
Oops, I just realized that this issue is closed. Sorry for the spam.
You can't seem to watch directories: