process.stdout


process.stdout 属性返回连接到 stdout (fd 1) 的流。 它是一个 net.Socket 流(也就是双工流),除非 fd 1 指向一个文件,在这种情况下它是一个可写流

例如,要将 process.stdin 拷贝到 process.stdout

process.stdin.pipe(process.stdout);

process.stdout 与其他的 Node.js 流有重大区别。 有关更多信息,参阅有关进程 I/O 的注意事项

The process.stdout property returns a stream connected to stdout (fd 1). It is a net.Socket (which is a Duplex stream) unless fd 1 refers to a file, in which case it is a Writable stream.

For example, to copy process.stdin to process.stdout:

process.stdin.pipe(process.stdout);

process.stdout differs from other Node.js streams in important ways. See note on process I/O for more information.