Implement extensions channel

This commit is contained in:
Asher
2019-07-08 10:33:58 -05:00
parent f51751ad21
commit a20fa4a97a
4 changed files with 52 additions and 21 deletions

View File

@@ -44,7 +44,7 @@ class Watcher extends DiskFileSystemProvider {
/**
* See: src/vs/platform/remote/common/remoteAgentFileSystemChannel.ts.
*/
export class FileProviderChannel implements IServerChannel {
export class FileProviderChannel implements IServerChannel, IDisposable {
private readonly provider: DiskFileSystemProvider;
private readonly watchers = new Map<string, Watcher>();
@@ -106,6 +106,11 @@ export class FileProviderChannel implements IServerChannel {
throw new Error(`Invalid call "${command}"`);
}
public dispose(): void {
this.watchers.forEach((w) => w.dispose());
this.watchers.clear();
}
private async stat(resource: UriComponents): Promise<IStat> {
return this.provider.stat(URI.from(resource));
}