Hello fellow developers!
I'm developing an app and struggling with how filesystem hooks are used.
From what I read in the documentation and Github issues I can listen to events using three different methods.
I tried the method described in the documentation and it worked well for session events (user login/logout etc.) but filesystem events are not emitted.
In my Application.php
I register three services: LogService
which is responsible for writing to a log destination, FileHooks
which contains the code for registering hooks for filesystem events and SessionHooks
which contains the same code but for the session events. While SessionHooks
's is registered properly, FileHooks
's constructor is not called for some reason.
I also added <filesystem/>
to the <types>
container in info.xml
which I read somewhere is neccessary for filesystem events to be emitted.
I then tried the apparently old method for registering hooks via \OCP\Util::connectHook()
with no success either.
I'd really appreciate if someone could look through the code and tell me if I'm missing something!!
I uploaded a ZIP archive containing the code here: https://my.owndrive.com/index.php/s/OLBPXx7nuMUgTvd
Thanks in advance & have a nice evening