MCPcopy
hub / github.com/pyodide/pyodide / NodeWriter

Class NodeWriter

src/js/streams.ts:759–778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

757type NodeWriteStream = NodeJS.WriteStream & { fd: number };
758
759class NodeWriter implements Writer {
760 stream: NodeWriteStream;
761 isatty: boolean;
762 constructor(stream: NodeWriteStream) {
763 this.stream = stream;
764 this.isatty = tty.isatty(stream.fd);
765 }
766
767 write(buffer: Uint8Array): number {
768 return fs.writeSync(this.stream.fd, buffer);
769 }
770
771 fsync() {
772 nodeFsync(this.stream.fd);
773 }
774
775 getTerminalSize() {
776 return this.stream;
777 }
778}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…