fileService.ts ×6

Frontier kind: Code frontier

unlabeled · c_fc61698e01af

403 tests · 11780 LOC · 45 files · introduces 0 tests · 26 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges26 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1895 ranges11780 lines · 45 files · Browse complete extent
All tests (intent)
403 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: 26 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

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

Open complete file

603 // validate read operation
604 const statPromise = this.validateReadFile(resource, readFileOptions).then(stat => stat, error => {
605 > cancellableSource.dispose(true); fileService.ts
606 >
607 > throw error;
608 });
609
648 };
649 } catch (error) {
651 > // Await the stream to finish so that we exit this method
652 > // in a consistent state with file handles closed
653 > // (https://github.com/microsoft/vscode/issues/114024)
654 > if (fileStream) {
655 > await consumeStream(fileStream);
656 > }
657 >
658 > // Re-throw errors as file operation errors but preserve
659 > // specific errors (such as not modified since)
660 > throw this.restoreReadError(error, resource, readFileOptions);
661 > }
662 }
663
664 private restoreReadError(error: Error, resource: URI, options?: IReadFileStreamOptions): FileOperationError {
665 > const message = localize('err.read', "Unable to read file '{0}' ({1})", this.resourceForError(resource), ensureFileSystemProviderError(error).toString()); fileService.ts
666 >
667 > if (error instanceof NotModifiedSinceFileOperationError) {
668 return new NotModifiedSinceFileOperationError(message, error.stat, options);
669 }
671 > if (error instanceof TooLargeFileOperationError) {
672 return new TooLargeFileOperationError(message, error.fileOperationResult, error.size, error.options as IReadFileOptions);
673 }
675 > return new FileOperationError(message, toFileOperationResult(error), options);
676 > }
677
678 private readFileStreamed(provider: IFileSystemProviderWithFileReadStreamCapability, resource: URI, token: CancellationToken, options: IReadFileStreamOptions = Object.create(null)): VSBufferReadableStream {
727 stream.end(VSBuffer.wrap(buffer));
728 } catch (err) {
729 > stream.error(err); fileService.ts
730 > stream.end();
731 > }
732 })();
733