I want to listen for changes in my NextCloud to be able to react to them. As far as I can see, there are two approaches:
Use the OS to sync the WebDAV folder to a local folder and listen for changes in the local folder by using some library or implementing custom software
Build a custom WebDAV-Client/use the NextCloud-API to listen for changes
Both of these options don't seem satisfying to me - they rely heavily on polling, might cause performance issues - additionally, there is no "change notification" - I've looked at the RFCs and docs.
How would you approach this situation (how would you build your code to do this)? I've searched for libraries - but I haven't found one - and I am wondering wether or not I'm trying something completely wrong