Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
4.4.0, 5.4.0
-
None
Description
Currently, QFileSystemWatcher only emits fileChanged and directoryChanged. In many cases those are too generic.
E.g. consider the scenario where an image viewer application needs to refresh the image whenever it is modified by an external application (e.g. Gimp). With QFileSystemWatcher one will get lots of fileChanged signals (because the file is saved in chunks) and there's no convenient way of detecting whether the image is saved, deleted, renamed, ..., or moved.
QFileSystemWatcher::fileWritten(const QString &path) would have been neat in this particular case.
(Implemented based on Inotify: IN_CLOSE_WRITE, dnotify: DN_MODIFY, kqueue: NOTE_WRITE, win: FILE_NOTIFY_CHANGE_LAST_WRITE).
And the same goes for QFileSystemWatcher::fileMoved/Deleted/Renamed, +++
Additionally, it would have been nice if I could tell QFileSystemWatcher to only listen for a certain types of events.
Attachments
Issue Links
- duplicates
-
QTBUG-172 More detailed notifications in QFileSystemWatcher
-
- Open
-