agentHostFileMonitorService.ts ×12

Frontier kind: Code frontier

unlabeled · c_89de9b82c93b

4 tests · 13516 LOC · 56 files · introduces 0 tests · 26 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
12 ranges26 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2242 ranges13516 lines · 56 files · Browse complete extent
All tests (intent)
4 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 26 introduced LOC across 12 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/agentHostFileMonitorService.ts 26 introduced LOC · 12 ranges

Open complete file

121 private _onDidFilesChange(event: FileChangesEvent): void {
122 for (const key of this._entries.keys()) {
123 > this._onDidFilesChangeEntry(key, event); agentHostFileMonitorService.ts
124 > }
125 }
126
127 private _onDidFilesChangeEntry(key: string, event: FileChangesEvent): void {
128 > const entry = this._entries.get(key); agentHostFileMonitorService.ts
129 > if (!entry || entry.callbacks.size === 0) {
130 return;
131 }
132 > if (!event.affects(entry.folder) || !this._hasRelevantRawChange(entry, event)) { agentHostFileMonitorService.ts
133 return;
134 }
135 > entry.debounce.value = disposableTimeout(() => { agentHostFileMonitorService.ts
136 entry.debounce.clear();
137 for (const callback of [...entry.callbacks]) {
142 }
143 }
144 > }, entry.debounceMs); agentHostFileMonitorService.ts
145 > }
146
147 private _hasRelevantRawChange(entry: IMonitorEntry, event: FileChangesEvent): boolean {
148 > return this._hasRelevantRawResources(entry, event.rawAdded) agentHostFileMonitorService.ts
149 > || this._hasRelevantRawResources(entry, event.rawUpdated)
150 || this._hasRelevantRawResources(entry, event.rawDeleted);
152
153 private _hasRelevantRawResources(entry: IMonitorEntry, resources: readonly URI[]): boolean {
154 > for (const resource of resources) { agentHostFileMonitorService.ts
155 > if (!extUriBiasedIgnorePathCase.isEqualOrParent(resource, entry.folder)) {
156 continue;
157 }
158 > if (!this._isExcluded(entry, resource)) { agentHostFileMonitorService.ts
159 > return true;
160 > }
161 > }
162 > return false;
163 > }
164
165 private _isExcluded(entry: IMonitorEntry, resource: URI): boolean {
166 > const basename = extUriBiasedIgnorePathCase.basename(resource); agentHostFileMonitorService.ts
167 > const relativePath = extUriBiasedIgnorePathCase.relativePath(entry.folder, resource);
168 > if (relativePath !== undefined && this._matchesExclude(entry, relativePath, basename)) {
169 return true;
170 }
171 > return this._matchesExclude(entry, resource.path, basename); agentHostFileMonitorService.ts
172 > }
173
174 private _matchesExclude(entry: IMonitorEntry, path: string, basename: string): boolean {
175 > return typeof entry.excludeMatcher(path, basename) === 'string'; agentHostFileMonitorService.ts
176 > }
177
178 private _canonicalizeFolder(folder: URI): URI {