in lib/src/directory_watcher/linux.dart [201:227]
void _applyChanges(Set<String> files, Set<String> dirs, Set<String> changed) {
for (var path in changed) {
var stream = _subdirStreams.remove(path);
if (stream != null) _nativeEvents.add(stream);
// Unless [path] was a file and still is, emit REMOVE events for it or its
// contents,
if (files.contains(path) && _files.contains(path)) continue;
for (var file in _files.remove(path)) {
_emitEvent(ChangeType.REMOVE, file);
}
}
for (var file in files) {
if (_files.contains(file)) {
_emitEvent(ChangeType.MODIFY, file);
} else {
_emitEvent(ChangeType.ADD, file);
_files.add(file);
}
}
for (var dir in dirs) {
_watchSubdir(dir);
_addSubdir(dir);
}
}