2 ms·
Does it keep working when files get overwritten by moving another over it, like some Linux text editors do?
by remram 4y ago
Does it keep working when files get overwritten by moving another over it, like some Linux text editors do?
- e-dant 4y agoI should test this. I haven’t seen a problem with that so far in my personal usage, so I’m inclined to say probably. That’s a good test case. I’ll make an issue.
- sgerenser 4y agoThis was a case that tripped me up when using Qt's QFileSystemWatcher. Many apps implement "atomic updates" to files by writing out to a new file (e.g. foo.txt.temp), then moving that file on top of the old one. As far as QFileSystemWatcher was concerned, the old file was deleted and its job is done (just because the new one has the same name doesn't mean it's the same file). So you have to watch the parent directory and manually implement checking for a specific file by name when the parent directory's contents changed.