diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index c04087a6d63..cd72d7d27bf 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -232,7 +232,9 @@ declare module 'vscode' { readonly onDidChange?: Event; - stat(resource: Uri): Thenable; + stat(resource: Uri, token: CancellationToken): Thenable; + + readdir(resource: Uri, token: CancellationToken): Thenable<[Uri, FileStat][]>; readFile(resource: Uri, token: CancellationToken): Thenable; @@ -246,9 +248,6 @@ declare module 'vscode' { // helps with performance bigly // copy?(from: Uri, to: Uri): Thenable; - - readdir(resource: Uri): Thenable<[Uri, FileStat][]>; - // todo@remote // ? useTrash, expose trash delete(resource: Uri, options: { recursive?: boolean; }): Thenable; diff --git a/src/vs/workbench/api/node/extHostFileSystem.ts b/src/vs/workbench/api/node/extHostFileSystem.ts index 646f2201817..2b3d8c6fdee 100644 --- a/src/vs/workbench/api/node/extHostFileSystem.ts +++ b/src/vs/workbench/api/node/extHostFileSystem.ts @@ -168,10 +168,10 @@ export class ExtHostFileSystem implements ExtHostFileSystemShape { } $stat(handle: number, resource: UriComponents): TPromise { - return asWinJsPromise(token => this._fsProvider.get(handle).stat(URI.revive(resource))); + return asWinJsPromise(token => this._fsProvider.get(handle).stat(URI.revive(resource), token)); } $readdir(handle: number, resource: UriComponents): TPromise<[UriComponents, IStat][], any> { - return asWinJsPromise(token => this._fsProvider.get(handle).readdir(URI.revive(resource))); + return asWinJsPromise(token => this._fsProvider.get(handle).readdir(URI.revive(resource), token)); } $readFile(handle: number, resource: UriComponents): TPromise { return asWinJsPromise(token => {