mirror of
https://github.com/coder/code-server.git
synced 2026-06-03 02:49:34 +00:00
Implement extensions channel
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user