Is there an object in Juce that watches changes in folders ?
Thanks
Is there an object in Juce that watches changes in folders ?
Thanks
No… This is a request that comes up fairly often, but I’ve never quite got around to doing one. The annoying bit is that to do this requires a thread, so isn’t quite as simple as you’d expect.
That is exactly the reason why I was hoping to find something in juice
feature request + 1
Should be very helpfull
+1
I actually have some half-written code lying around to do this, but never got chance to finish it…
If you use inotify, you don’t need a thread, since you can select on the returned file descriptor like you already do in your message thread (adding the file descriptor to the list you’re selecting upon already).
I don’t know for Windows & Mac however.
Dear Jules,
Did you or your team got any finished implementations of this pretty interesting feature?
It would be very nice to see a method like
browserContentChanged inside FileBrowserListener
thanks.
No, I don’t think anyone ever did that!
Perhaps something has been done in the last month regarding this aspect?
I’d need to trigger the refresh of a DirectoryContentsList when something inside the listed directory changes.
Check out FileSystemWatcher in my module Gin: https://github.com/FigBug/Gin
It will give a callback if anything in the folder changes, on Windows & Mac it will tell you specifically what changed (ie file delete, added, modified, etc). I still need to implement that for Linux.