fileService.ts ×6

Frontier kind: Code frontier

unlabeled · c_3b303f6555dc

731 tests · 11870 LOC · 44 files · introduces 0 tests · 24 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges24 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1936 ranges11870 lines · 44 files · Browse complete extent
All tests (intent)
731 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: 24 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/files/common/fileService.ts 24 introduced LOC · 6 ranges

Open complete file

220
221 return this.toFileStat(provider, resource, stat, undefined, !!resolveMetadata, (stat, siblings) => {
223 > // lazy trie to check for recursive resolving
224 > if (!trie) {
225 > trie = TernarySearchTree.forUris<true>(() => !isPathCaseSensitive);
226 > trie.set(resource, true);
227 > if (resolveTo) {
228 trie.fill(true, resolveTo);
229 }
230 > } fileService.ts
231 >
232 > // check for recursive resolving
233 > if (trie.get(stat.resource) || trie.findSuperstr(stat.resource.with({ query: null, fragment: null } /* required for https://github.com/microsoft/vscode/issues/128151 */))) {
234 > return true;
235 > }
236
237 // check for resolving single child folders
238 > if (stat.isDirectory && resolveSingleChildDescendants) { fileService.ts
239 return siblings === 1;
240 }
268 // check to recurse for directories
269 if (fileStat.isDirectory && recurse(fileStat, siblings)) {
270 > try { fileService.ts
271 > const entries = await provider.readdir(resource);
272 > const resolvedEntries = await Promises.settled(entries.map(async ([name, type]) => {
273 try {
274 const childResource = providerExtUri.joinPath(resource, name);
281 return null; // can happen e.g. due to permission errors
282 }
283 > })); fileService.ts
284 >
285 > // make sure to get rid of null values that signal a failure to resolve a particular entry
286 > fileStat.children = coalesce(resolvedEntries);
287 > } catch (error) {
288 this.logService.trace(error);
289
290 fileStat.children = []; // gracefully handle errors, we may not have permissions to read
291 }
293 > return fileStat;
294 > }
295
296 return fileStat;