mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode 071a5cf16fc999727acc31c790d78f750fa4b166 (#5261)
This commit is contained in:
@@ -899,6 +899,7 @@ export class TestFileService implements IFileService {
|
||||
readonly onError: Event<Error> = Event.None;
|
||||
|
||||
private content = 'Hello Html';
|
||||
private lastReadFileUri: URI;
|
||||
|
||||
constructor() {
|
||||
this._onFileChanges = new Emitter<FileChangesEvent>();
|
||||
@@ -913,6 +914,10 @@ export class TestFileService implements IFileService {
|
||||
return this.content;
|
||||
}
|
||||
|
||||
public getLastReadFileUri(): URI {
|
||||
return this.lastReadFileUri;
|
||||
}
|
||||
|
||||
public get onFileChanges(): Event<FileChangesEvent> {
|
||||
return this._onFileChanges.event;
|
||||
}
|
||||
@@ -952,6 +957,8 @@ export class TestFileService implements IFileService {
|
||||
}
|
||||
|
||||
readFile(resource: URI, options?: IReadFileOptions | undefined): Promise<IFileContent> {
|
||||
this.lastReadFileUri = resource;
|
||||
|
||||
return Promise.resolve({
|
||||
resource: resource,
|
||||
value: VSBuffer.fromString(this.content),
|
||||
@@ -964,6 +971,8 @@ export class TestFileService implements IFileService {
|
||||
}
|
||||
|
||||
readFileStream(resource: URI, options?: IReadFileOptions | undefined): Promise<IFileStreamContent> {
|
||||
this.lastReadFileUri = resource;
|
||||
|
||||
return Promise.resolve({
|
||||
resource: resource,
|
||||
value: {
|
||||
|
||||
Reference in New Issue
Block a user