QFileSystemWatcher JUCE?

hi,

my research suggests the answer is no, but i'm wondering if anyone is aware of something similar to QFileSystemWatcher in JUCE? I need to monitor changes to a text file on disk, and it needs to be cross platform.

thanks

oli

I had a half-written class along these lines somewhere, which I never got up to a publishable state! Have been meaning to look at it again..

any chance you could share the gist of it? do you use the OS specific stuff like FSEvents or can it be done using existing JUCE classes?

 

It involved platform-specific stuff, that's why I never finished. Would have to dig around and find what I had.

If you're not too fussy about timing though, it's trivially easy to run a timer that checks the file modification time every couple of seconds - in all the places I ever needed this kind of functionality, that turned out to be a better solution than a more OS-based implementation.