[Github-comments] [geany/geany-plugins] Project Organizer: Monitor project directory for changes automatically. (#332)
LarsGit223
notifications at xxxxx
Sat Feb 17 18:07:02 UTC 2018
> 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).
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/issues/332#issuecomment-366459919
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20180217/11d63fb0/attachment.html>
More information about the Github-comments
mailing list