allow to define byte-offset and byte-count when reading from a provider

This commit is contained in:
Johannes Rieken
2017-09-21 17:38:02 +02:00
parent 424e1ebc28
commit 40dd269a72
6 changed files with 13 additions and 14 deletions

View File

@@ -90,9 +90,9 @@ class RemoteFileSystemProvider implements IFileSystemProvider {
stat(resource: URI): TPromise<IStat, any> {
return this._proxy.$stat(this._handle, resource);
}
read(resource: URI, progress: IProgress<Uint8Array>): TPromise<void, any> {
read(resource: URI, offset: number, count: number, progress: IProgress<Uint8Array>): TPromise<number, any> {
this._reads.set(resource.toString(), progress);
return this._proxy.$read(this._handle, resource);
return this._proxy.$read(this._handle, offset, count, resource);
}
reportFileChunk(resource: URI, chunk: number[]): void {
this._reads.get(resource.toString()).report(Buffer.from(chunk));