fileService.ts ×6

Frontier kind: Code frontier

unlabeled · c_55527d980f95

1223 tests · 11203 LOC · 44 files · introduces 0 tests · 22 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges22 lines · 1 files
Tests
0 tests

Contains — complete concept membership

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

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

Open complete file

93
94 async activateProvider(scheme: string): Promise<void> {
96 > // Emit an event that we are about to activate a provider with the given scheme.
97 > // Listeners can participate in the activation by registering a provider for it.
98 > const joiners: Promise<void>[] = [];
99 > this._onWillActivateFileSystemProvider.fire({
100 > scheme,
101 > join(promise) {
102 joiners.push(promise);
103 },
104 > }); fileService.ts
105 >
106 > if (this.provider.has(scheme)) {
107 return; // provider is already here so we can return directly
108 }
111 // that it takes a bit longer to register the file system provider.
112 await Promises.settled(joiners);
113 > } fileService.ts
114
115 async canHandleResource(resource: URI): Promise<boolean> {
136
137 protected async withProvider(resource: URI): Promise<IFileSystemProvider> {
139 > // Assert path is absolute
140 > if (!isAbsolutePath(resource)) {
141 throw new FileOperationError(localize('invalidPath', "Unable to resolve filesystem provider with relative file path '{0}'", this.resourceForError(resource)), FileOperationResult.FILE_INVALID_PATH);
142 }
144 > // Activate provider
145 > await this.activateProvider(resource.scheme);
146 >
147 > // Assert provider
148 > const provider = this.provider.get(resource.scheme);
149 > if (!provider) {
150 const error = new ErrorNoTelemetry();
151 error.message = localize('noProviderFound', "ENOPRO: No file system provider found for resource '{0}'", resource.toString());
155
156 return provider;
157 > } fileService.ts
158
159 private async withReadProvider(resource: URI): Promise<IFileSystemProviderWithFileReadWriteCapability | IFileSystemProviderWithOpenReadWriteCloseCapability | IFileSystemProviderWithFileReadStreamCapability> {