mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode 10492ba146318412cbee8b76a8c630f226914734
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user