896
// Dispose watchers that are gone or whose recursive flag changed.
897
for (const [rootUri, watcher] of this._watchers.entries()) {
899
>
if (!next || next.recursive !== watcher.recursive) {
900
watcher.disposable.dispose();
901
this._watchers.delete(rootUri);
902
}
904
905
for (const [rootUri, next] of nextWatchRootUris.entries()) {
906
const existing = this._watchers.get(rootUri);
907
if (existing) {
909
>
existing.resourcesToWatch.clear();
910
>
for (const uri of next.resourcesToWatch) {
911
>
existing.resourcesToWatch.add(uri);
912
>
}
913
>
continue;
914
>
}
915
try {
916
const disposable = this._fileService.watch(rootUri, { recursive: next.recursive, excludes: [] });