fileService.ts ×3

Frontier kind: Code frontier

unlabeled · c_6bc0f55fe744

677 tests · 11683 LOC · 46 files · introduces 0 tests · 34 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
4 ranges34 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1843 ranges11683 lines · 46 files · Browse complete extent
All tests (intent)
677 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.

2 files ranked by introduced lines: 34 introduced LOC across 4 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/files/common/fileService.ts 31 introduced LOC · 3 ranges

Open complete file

1184 try {
1185 const disposable = await this.doWatch(resource, options);
1186 > if (watchDisposed) { fileService.ts
1187 dispose(disposable);
1188 > } else { fileService.ts
1189 disposeWatch = () => dispose(disposable);
1190 }
1218 private async doWatch(resource: URI, options: IWatchOptions): Promise<IDisposable> {
1219 const provider = await this.withProvider(resource);
1221 > // Deduplicate identical watch requests
1222 > const watchHash = hash([this.getExtUri(provider).providerExtUri.getComparisonKey(resource), options]);
1223 > let watcher = this.activeWatchers.get(watchHash);
1224 > if (!watcher) {
1225 > watcher = {
1226 > count: 0,
1227 > disposable: provider.watch(resource, options)
1228 > };
1229 >
1230 > this.activeWatchers.set(watchHash, watcher);
1231 > }
1232 >
1233 > // Increment usage counter
1234 > watcher.count += 1;
1235 >
1236 > return toDisposable(() => {
1237 > if (watcher) {
1238 >
1239 > // Unref
1240 > watcher.count--;
1241 >
1242 > // Dispose only when last user is reached
1243 > if (watcher.count === 0) {
1244 > dispose(watcher.disposable);
1245 > this.activeWatchers.delete(watchHash);
1246 > }
1247 > }
1248 > });
1249 }
1250
src/vs/platform/files/common/inMemoryFilesystemProvider.ts 3 introduced LOC · 1 range

Open complete file

334
335 watch(resource: URI, opts: IWatchOptions): IDisposable {
336 > // ignore, fires for all changes... inMemoryFilesystemProvider.ts
337 > return Disposable.None;
338 > }
339
340 private _fireSoon(...changes: IFileChange[]): void {