mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
remote - better reads
This commit is contained in:
@@ -371,7 +371,7 @@ export interface MainThreadFileSystemShape extends IDisposable {
|
||||
|
||||
$onDidAddFileSystemRoot(root: UriComponents): void;
|
||||
$onFileSystemChange(handle: number, resource: IFileChange[]): void;
|
||||
$reportFileChunk(handle: number, resource: UriComponents, chunk: number[] | null): void;
|
||||
$reportFileChunk(handle: number, session: number, chunk: number[] | null): void;
|
||||
|
||||
$handleSearchProgress(handle: number, session: number, resource: UriComponents): void;
|
||||
}
|
||||
@@ -535,14 +535,14 @@ export interface ExtHostWorkspaceShape {
|
||||
export interface ExtHostFileSystemShape {
|
||||
$utimes(handle: number, resource: UriComponents, mtime: number, atime: number): TPromise<IStat>;
|
||||
$stat(handle: number, resource: UriComponents): TPromise<IStat>;
|
||||
$read(handle: number, offset: number, count: number, resource: UriComponents): TPromise<number>;
|
||||
$read(handle: number, session: number, offset: number, count: number, resource: UriComponents): TPromise<number>;
|
||||
$write(handle: number, resource: UriComponents, content: number[]): TPromise<void>;
|
||||
$unlink(handle: number, resource: UriComponents): TPromise<void>;
|
||||
$move(handle: number, resource: UriComponents, target: UriComponents): TPromise<IStat>;
|
||||
$mkdir(handle: number, resource: UriComponents): TPromise<IStat>;
|
||||
$readdir(handle: number, resource: UriComponents): TPromise<[UriComponents, IStat][]>;
|
||||
$rmdir(handle: number, resource: UriComponents): TPromise<void>;
|
||||
$fileFiles(handle: number, session: number, query: string): TPromise<void>;
|
||||
$findFiles(handle: number, session: number, query: string): TPromise<void>;
|
||||
}
|
||||
|
||||
export interface ExtHostExtensionServiceShape {
|
||||
|
||||
@@ -48,10 +48,10 @@ export class ExtHostFileSystem implements ExtHostFileSystemShape {
|
||||
$stat(handle: number, resource: UriComponents): TPromise<IStat, any> {
|
||||
return asWinJsPromise(token => this._provider.get(handle).stat(URI.revive(resource)));
|
||||
}
|
||||
$read(handle: number, offset: number, count: number, resource: UriComponents): TPromise<number> {
|
||||
$read(handle: number, session: number, offset: number, count: number, resource: UriComponents): TPromise<number> {
|
||||
const progress = {
|
||||
report: chunk => {
|
||||
this._proxy.$reportFileChunk(handle, resource, [].slice.call(chunk));
|
||||
this._proxy.$reportFileChunk(handle, session, [].slice.call(chunk));
|
||||
}
|
||||
};
|
||||
return asWinJsPromise(token => this._provider.get(handle).read(URI.revive(resource), offset, count, progress));
|
||||
@@ -74,7 +74,7 @@ export class ExtHostFileSystem implements ExtHostFileSystemShape {
|
||||
$rmdir(handle: number, resource: UriComponents): TPromise<void, any> {
|
||||
return asWinJsPromise(token => this._provider.get(handle).rmdir(URI.revive(resource)));
|
||||
}
|
||||
$fileFiles(handle: number, session: number, query: string): TPromise<void> {
|
||||
$findFiles(handle: number, session: number, query: string): TPromise<void> {
|
||||
const provider = this._provider.get(handle);
|
||||
if (!provider.findFiles) {
|
||||
return TPromise.as(undefined);
|
||||
|
||||
Reference in New Issue
Block a user