QFileSystemWatcher in Background/Thread
I want to create a thread, running in background to poll FileSystemWatcher changes. Is it possible to catch a FileSystemChange in a background-thread? Any Code-Examples?
Thank you very much!
A nice alternative on Linux is iNotify. QFileSystemWatcher docs mention overhead, and iNotify seems to run with no impact on my Ubuntu box. YMMV.
iNotify is not exactly a cross-platform solution though.
Did you notice the file "src/corelib/io/qfilesystemwatcher_inotify.cpp" in the qtbase tree? Looks like QFileSystemWatcher will also use inotify;)
So...is it possible in a background thread? A QRunnable or QThread?