mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
support findFiles
This commit is contained in:
@@ -324,6 +324,8 @@ export interface MainThreadFileSystemShape extends IDisposable {
|
||||
$onDidAddFileSystemRoot(root: URI): void;
|
||||
$onFileSystemChange(handle: number, resource: IFileChange[]): void;
|
||||
$reportFileChunk(handle: number, resource: URI, chunk: number[] | null): void;
|
||||
|
||||
$handleSearchProgress(handle: number, session: number, resource: URI): void;
|
||||
}
|
||||
|
||||
export interface MainThreadTaskShape extends IDisposable {
|
||||
@@ -489,6 +491,7 @@ export interface ExtHostFileSystemShape {
|
||||
$mkdir(handle: number, resource: URI): TPromise<IStat>;
|
||||
$readdir(handle: number, resource: URI): TPromise<[URI, IStat][]>;
|
||||
$rmdir(handle: number, resource: URI): TPromise<void>;
|
||||
$fileFiles(handle: number, session: number, query: string): TPromise<void>;
|
||||
}
|
||||
|
||||
export interface ExtHostExtensionServiceShape {
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user