I'm not sure if GFileMonitor supports recursive directory monitoring, so it may not even be possible to do what I was hoping simply enough,...
I implemented an automatic live update in the workbench plugin in PR #695. I can say that it requires a bit effort because recursive directory monitoring is not possible. That means you have to generate a file monitor for each directory and each sub-directory contained in it.
Also a manual re-scan is required sometimes. Let's assume the following situation of existing files and directories: - dir1 - file1.1 - file1.2 - dir2 - file2.1 - file2.2
Now someone copies in a new directory with 2 files in it, so the filesystem would look like this: - dir1 - file1.1 - file1.2 - dir2 - file2.1 - file2.2 - dir3 - file3.1 - file3.2
The file monitoring will only notify you about the new filepath for dir3. But you need to re-scan the directory on that event to also recognizes the files contained in it (and of course create a new file monitor for it to be notified of future changes in dir3).