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

open event #901

Closed
seppelinchen opened this issue Jun 27, 2022 · 3 comments
Closed

open event #901

seppelinchen opened this issue Jun 27, 2022 · 3 comments

Comments

@seppelinchen
Copy link

hello,
may i ask for an additional event?
a file open event would be nice ;)
thank you...

@kurtmckee
Copy link
Contributor

kurtmckee commented Oct 13, 2022

After reviewing the documentation for FSEvents event flags and ReadDirectoryChangesW event flags, it appears that this is impossible to do using Apple's and Microsoft's operating system API's.

However, it appears that inotify and kqueue support file open events. Therefore it may be possible to add this for those specific platform-specific observers.

(MacOS supports kqueue, though the kqueue observer is not the first observer watchdog tries to use by default on MacOS.)

@BoboTiG
Copy link
Collaborator

BoboTiG commented Jan 4, 2023

FTR I would be OK to merge a patch that adds an open event for supported OSes.

dstaple added a commit to VoleonGroup/watchdog that referenced this issue Jan 23, 2023
As per gorakhargosh#901 , this adds
support to detect file open events on supported OSes.
BoboTiG pushed a commit that referenced this issue Jan 24, 2023
…events (#941)

* Add FileOpenedEvent

As per #901 , this adds
support to detect file open events on supported OSes.

* Add file_opened_event in test_file_system_event_handler_dispatch

* Get tests passing on OS X Ventura

* Update changelog.rst

* flake8: Fix long line in test_emitter.py

Co-authored-by: Douglas Staple <staple.douglas@gmail.com>
@BoboTiG
Copy link
Collaborator

BoboTiG commented Jan 24, 2023

Thanks to the great work from @dstaple, it's now implemented for inotify. Therefore I close the issue.

@BoboTiG BoboTiG closed this as completed Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants