diskFileSystemProvider.ts ×10

Frontier kind: Code frontier

unlabeled · c_ab921a99e36b

16 tests · 13806 LOC · 64 files · introduces 0 tests · 34 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
11 ranges34 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2133 ranges13806 lines · 64 files · Browse complete extent
All tests (intent)
16 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 11 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/files/node/diskFileSystemProvider.ts 32 introduced LOC · 10 ranges

Open complete file

72
73 async stat(resource: URI): Promise<IStat> {
75 > const { stat, symbolicLink } = await SymlinkSupport.stat(this.toFilePath(resource)); // cannot use fs.stat() here to support links properly
76 >
77 > let permissions: FilePermission | undefined = undefined;
78 > if ((stat.mode & 0o200) === 0) {
79 permissions = FilePermission.Locked;
80 }
82 > stat.mode & constants.S_IXUSR ||
83 stat.mode & constants.S_IXGRP ||
84 stat.mode & constants.S_IXOTH
86 permissions = (permissions ?? 0) | FilePermission.Executable;
87 }
89 > return {
90 > type: this.toType(stat, symbolicLink),
91 > ctime: stat.birthtime.getTime(), // intentionally not using ctime here, we want the creation time
92 > mtime: stat.mtime.getTime(),
93 > size: stat.size,
94 > permissions
95 > };
96 > } catch (error) {
97 throw this.toFileSystemProviderError(error);
98 }
100
101 private async statIgnoreError(resource: URI): Promise<IStat | undefined> {
140
141 private toType(entry: Stats | IDirent, symbolicLink?: { dangling: boolean }): FileType {
143 > // Signal file type by checking for file / directory, except:
144 > // - symbolic links pointing to nonexistent files are FileType.Unknown
145 > // - files that are neither file nor directory are FileType.Unknown
146 > let type: FileType;
147 > if (symbolicLink?.dangling) {
148 type = FileType.Unknown;
149 > } else if (entry.isFile()) { diskFileSystemProvider.ts
150 type = FileType.File;
151 > } else if (entry.isDirectory()) { diskFileSystemProvider.ts
152 type = FileType.Directory;
153 } else {
154 type = FileType.Unknown;
155 }
157 > // Always signal symbolic link as file type additionally
158 > if (symbolicLink) {
159 type |= FileType.SymbolicLink;
160 }
162 > return type;
163 > }
164
165 //#endregion
src/vs/platform/files/common/diskFileSystemProvider.ts 2 introduced LOC · 1 range

Open complete file

242
243 protected toFilePath(resource: URI): string {
244 > return normalize(resource.fsPath); diskFileSystemProvider.ts
245 > }
246
247 private toWatchPath(resource: URI): string {