Closed seekforwings closed 6 years ago
@emcrisostomo well, could you please tell me whether there is anyway to notify the creation of a file with kqueue?
@seekforwings, well, that's a general question about kqueue
and not a fswatch
issue. Unless you've got one, please direct your general question elsewhere if you expect them to be promptly answered.
I suggest you consult the kqueue
man page where you'll find the answer.
@emcrisostomo , is it better to use fsevent rather than kqueue on osx system? On some BSD system, kqueue can be used. However, I'd read the code but I couldn't find out any way to notify when a file is created. And the man page seems to be not talking about this kind of event. So, this is why I wanted to ask and I did ask here.
The code I read is here: fswatch/libfswatch/src/libfswatch/c++/kqueue_monitor.cpp
You can see that there is no flag like file creation:
Comparing with FSEvent in fswatch/libfswatch/src/libfswatch/c++/fsevents_monitor.cpp
https://github.com/emcrisostomo/fswatch/blob/ce91bbe6df926c59566c6522cba8cfe21c6409cd/libfswatch/src/libfswatch/c%2B%2B/kqueue_monitor.cpp#L84