- Polling watchers now check file sizes as well as "last modified" times, so
they are less likely to miss changes on platforms with low resolution
timestamps. DirectoryWatcheron Windows performance: reduce 100ms buffering of events
before reporting to 5ms, the larger buffer isn't needed for correctness after
the various fixes.DirectoryWatcheron Windows watches in a separate Isolate to make buffer
exhaustion, "Directory watcher closed unexpectedly", much less likely. The old
implementation which does not use a separate Isolate is available as
DirectoryWatcher(path, runInIsolateOnWindows: false).DirectoryWatcheron Windows: if buffer exhaustion does happen, emit a
"modify" event for all know files instead of an exception.- Document behavior on Linux if the system watcher limit is hit.
- Require Dart SDK
^3.4.0. - Bug fix: native
DirectoryWatcherimplementations now consistently handle
links as files, instead of sometimes reading through them and sometimes
reporting them as files. The pollingDirectoryWatcherstill reads through
links. - Bug fix: with the polling
DirectoryWatcher, fix spurious modify event
emitted because of a file delete during polling. - Bug fix: due to the link handling change, native
DirectoryWatcheron Linux
and MacOS is no longer affected by a severe performance regression if there
are symlink loops in the watched directory. The pollingDirectoryWatcher
is fixed to skip already-visited directories to prevent the performance issue
while still reading through links. - Bug fix: with
DirectoryWatcheron Windows, the last of a rapid sequence of
modifications in a newly-created directory was sometimes dropped. Make it
reliably report the last modification. - Bug fix: with
DirectoryWatcheron Windows, a move over an existing file was
reported incorrectly. For example, ifaandbalready exist, thenais
moved ontob, it would be reported as three events: deletea, deleteb,
createb. Now it's reported as two events: deletea, modifyb. This
matches the behavior of the Linux and MacOS watchers. - Bug fix: with
DirectoryWatcheron Windows, new links to directories were
sometimes incorrectly handled as actual directories. Now they are reported
as files, matching the behavior of the Linux and MacOS watchers. - Bug fix: unify
DirectoryWatcherimplementation on Windows with the MacOS
implementation, addressing various race conditions around directory renames. - Bug fix: new
DirectoryWatcherimplementation on Linux that fixes various
issues: tracking failure following subdirectory move, incorrect events when
there are changes in a recently-moved subdirectory, incorrect events due to
various situations involving subdirectory moves. - Bug fix: new
DirectoryWatcherimplementation on MacOS that fixes various
issues including duplicate events for changes in new directories, incorrect
events when close together directory renames have overlapping names. - Bug fix: with
FileWatcheron MacOS, a modify event was sometimes reported if
the file was created immediately before the watcher was created. Now, if the
file exists when the watcher is created then this modify event is not sent.
This matches the Linux native and polling (Windows) watchers.