mirror of
https://github.com/cdr/code-server.git
synced 2026-03-16 02:01:35 +01:00
* Implement write/read buffers in electron fill This makes cutting and copy files from the file tree work. * Implement fs.createReadStream This is used by the file tree to copy files. * Allow passing proxies back from client to server This makes things like piping streams possible. * Synchronously bind to proxy events This eliminates any chance whatsoever of missing events due to binding too late. * Make it possible to bind some events on demand * Add some protocol documentation
15 lines
487 B
TypeScript
15 lines
487 B
TypeScript
import * as trash from "trash";
|
|
import { ClientServerProxy } from "../../common/proxy";
|
|
import { TrashModuleProxy } from "../../node/modules/trash";
|
|
|
|
// tslint:disable completed-docs
|
|
|
|
interface ClientTrashModuleProxy extends TrashModuleProxy, ClientServerProxy {}
|
|
|
|
export class TrashModule {
|
|
public constructor(private readonly proxy: ClientTrashModuleProxy) {}
|
|
|
|
public trash = (path: string, options?: trash.Options): Promise<void> => {
|
|
return this.proxy.trash(path, options);
|
|
}
|
|
}
|