Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flags arg is invalid #6

Open
stamhankar999 opened this issue Apr 23, 2021 · 1 comment
Open

flags arg is invalid #6

stamhankar999 opened this issue Apr 23, 2021 · 1 comment

Comments

@stamhankar999
Copy link

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.

@Ansud
Copy link

Ansud commented Dec 9, 2021

Check my PR to this repo #7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants