QFileSystemWatcher JUCE?


#1

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


#2

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..


#3

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?

 


#4

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.