terminalSandboxEngine.ts ×8

Frontier kind: Code frontier

unlabeled · c_239438ff60cb

36 tests · 12256 LOC · 56 files · introduces 0 tests · 25 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges25 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1857 ranges12256 lines · 56 files · Browse complete extent
All tests (intent)
36 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: 25 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/sandbox/common/terminalSandboxEngine.ts 25 introduced LOC · 8 ranges

Open complete file

934
935 private async _resolveFileSystemPaths(paths: string[] | undefined): Promise<string[]> {
936 > const resolvedPaths = await Promise.all((paths ?? []).map(path => this._resolveFileSystemPath(path))); terminalSandboxEngine.ts
937 > const seenPaths = new Set<string>();
938 > return resolvedPaths.flat().filter(path => {
939 > const comparisonKey = this._getFileSystemPathComparisonKey(path);
940 > if (seenPaths.has(comparisonKey)) {
941 return false;
942 }
943 > seenPaths.add(comparisonKey); terminalSandboxEngine.ts
944 > return true;
945 > });
946 > }
947
948 private _getFileSystemPathComparisonKey(path: string): string {
949 > return this._os === OperatingSystem.Windows ? path.replace(/\//g, '\\').toLowerCase() : path; terminalSandboxEngine.ts
950 > }
951
952 private async _resolveFileSystemPath(path: string): Promise<string[]> {
953 > const expandedPath = this._os === OperatingSystem.Linux ? this._expandHomePath(path) : path; terminalSandboxEngine.ts
954 > if (!this._isAbsoluteFileSystemPath(expandedPath)) {
955 return [expandedPath];
956 }
958 > try {
959 > const realpath = await this._fileService.realpath(this._toFileSystemResource(expandedPath));
960 > const resolvedPath = realpath ? this._getUriPath(realpath) : undefined;
961 > // Keep the expanded path (the configured path after home expansion) so permissions apply when accessed through the symlink.
962 > // Also include the resolved path (the canonical symlink target) so the same permissions apply when accessed directly.
963 > return resolvedPath && resolvedPath !== expandedPath ? [expandedPath, resolvedPath] : [expandedPath];
964 > } catch {
965 return [expandedPath];
966 }
968
969 private _isAbsoluteFileSystemPath(path: string): boolean {
972
973 private _toFileSystemResource(path: string): URI {
974 > if (this._os === OperatingSystem.Windows) { terminalSandboxEngine.ts
975 return this._toWindowsFileSystemResource(path);
976 }
977 > return this._userHome?.with({ path }) ?? this._tempDir?.with({ path }) ?? this._host.getWriteRoots()[0]?.with({ path }) ?? URI.file(path); terminalSandboxEngine.ts
978 > }
979
980 private _toWindowsFileSystemResource(path: string): URI {