[Interest] QFileSystemWatcher: Timing of file changed signal.

Michael Jackson mike.jackson at bluequartz.net
Tue Oct 10 17:17:44 CEST 2023


I have a question about exactly _when_ the signal for "file changed" is
sent. Say we have a file watcher on a 10 Gigabyte file. And we start
rewriting that file (not atomically) by streaming data to the file. Does
the signal get sent when we get done streaming the data to the file and we
close the file on our end? or at some other time?

I get that this probably completely depends on the operating system being
used. I am not really familiar at that low a level how filesystems work
(like NTFS, APFS and others) so I can't figure out what would happen.

This also probably points to an issue in our design where we probably
should just be streaming to a temp file then atomically replace
the original with the new one.
--
Mike Jackson
BlueQuartz Software
Principal DREAM.3D Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20231010/9dfe9612/attachment.htm>


More information about the Interest mailing list