-
Notifications
You must be signed in to change notification settings - Fork 8
Description
While experimenting with Monitor today, I could capture fs events as per the example, but I could not determine the actual event-type that had occurred for the file in question (e.g. created, updated, etc.). I think flags
is supposed to be an array of fsw_event_flag's, and flags_num
is supposed to be the size of that array. However, flags
(at the Python level) is an int, so I can't traverse the array. I think it's the memory address that has the array. based on this. Maybe that should be a ctypes.POINTER(ctypes.c_int)
.
Also, while I'm on the subject: what's the purpose of the event_num
arg to the callback? If it's "number of events", that doesn't make sense for the monitor callback, which (from what I can tell) is called with one event. The lower-level callback takes two args (events, event_num), and there it does make sense.
Thanks.