Merge from vscode 10492ba146318412cbee8b76a8c630f226914734

This commit is contained in:
ADS Merger
2020-04-08 06:33:38 +00:00
parent fca2344c2e
commit 1868a7d370
339 changed files with 3795 additions and 3146 deletions

View File

@@ -18,7 +18,6 @@ import { isReadableStream, transform, ReadableStreamEvents, consumeReadableWithL
import { Queue } from 'vs/base/common/async';
import { CancellationTokenSource, CancellationToken } from 'vs/base/common/cancellation';
import { Schemas } from 'vs/base/common/network';
import { assign } from 'vs/base/common/objects';
import { createReadStream } from 'vs/platform/files/common/io';
export class FileService extends Disposable implements IFileService {
@@ -183,7 +182,7 @@ export class FileService extends Disposable implements IFileService {
const stat = await provider.stat(resource);
let trie: TernarySearchTree<boolean> | undefined;
let trie: TernarySearchTree<string, boolean> | undefined;
return this.toFileStat(provider, resource, stat, undefined, !!resolveMetadata, (stat, siblings) => {
@@ -384,14 +383,15 @@ export class FileService extends Disposable implements IFileService {
async readFile(resource: URI, options?: IReadFileOptions): Promise<IFileContent> {
const provider = await this.withReadProvider(resource);
const stream = await this.doReadAsFileStream(provider, resource, assign({
const stream = await this.doReadAsFileStream(provider, resource, {
...options,
// optimization: since we know that the caller does not
// care about buffering, we indicate this to the reader.
// this reduces all the overhead the buffered reading
// has (open, read, close) if the provider supports
// unbuffered reading.
preferUnbuffered: true
}, options || Object.create(null)));
});
return {
...stream,