I have many directories that I should sync with a sqlite db. The database should ever store the files content in these directories. To do this I've made a thread (lowest priority) that continuously looks for changes in the directories. However this thread uses 100% of cpu of one core. Is there a better way to sync files? Maybe a listener that emits a signal when a file will be created or removed?
Thanks, Regards Andrea