support findFiles

This commit is contained in:
Johannes Rieken
2017-10-10 12:20:38 +02:00
parent 0b03de632a
commit 51b0bf3c78
4 changed files with 65 additions and 7 deletions

View File

@@ -74,4 +74,12 @@ export class ExtHostFileSystem implements ExtHostFileSystemShape {
$rmdir(handle: number, resource: URI): TPromise<void, any> {
return asWinJsPromise(token => this._provider.get(handle).rmdir(resource));
}
$fileFiles(handle: number, session: number, query: string): TPromise<void> {
const provider = this._provider.get(handle);
if (!provider.findFiles) {
return TPromise.as(undefined);
}
const progress = { report: (uri) => this._proxy.$handleSearchProgress(handle, session, uri) };
return asWinJsPromise(token => provider.findFiles(query, progress, token));
}
}