Detecting client side changes to content

I am new here. I hope this is an appropriate forum.

I have a desktop application that uses the NextCloud client side directory tree and a local postgres database. I would like to add a daemon to the desktop app to catch changes made by the end user, so I can update the local db. Running a scan of the directory tree periodically is one way.

The nextcloud client handle such events, so hooking into it is very appealing. Is there is a public api or similar to allow the local app to get a read on items changed?