diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-11-03 19:53:06 +0100 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-11-13 23:02:33 -0800 |
commit | 0e06b350b6d7c80875321531593efc6f273620e5 (patch) | |
tree | 1aac5d70f91b686e3cdac376ff6d40cb585e238d /doc | |
parent | 9409883dc5f96fb5e9dc7ee34e005547df50418c (diff) | |
download | android-node-v8-0e06b350b6d7c80875321531593efc6f273620e5.tar.gz android-node-v8-0e06b350b6d7c80875321531593efc6f273620e5.tar.bz2 android-node-v8-0e06b350b6d7c80875321531593efc6f273620e5.zip |
fs,net: standardize `pending` stream property
Use the same property name as http2 does to indicate that
the stream is in the state before the `ready` event is emitted.
PR-URL: https://github.com/nodejs/node/pull/24067
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/fs.md | 20 | ||||
-rw-r--r-- | doc/api/net.md | 12 |
2 files changed, 32 insertions, 0 deletions
diff --git a/doc/api/fs.md b/doc/api/fs.md index 240ba58567..38e5e4e626 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -488,6 +488,16 @@ argument to `fs.createReadStream()`. If `path` is passed as a string, then `readStream.path` will be a string. If `path` is passed as a `Buffer`, then `readStream.path` will be a `Buffer`. +### readStream.pending +<!-- YAML +added: REPLACEME +--> + +* {boolean} + +This property is `true` if the underlying file has not been opened yet, +i.e. before the `'ready'` event is emitted. + ## Class: fs.Stats <!-- YAML added: v0.1.21 @@ -833,6 +843,16 @@ argument to [`fs.createWriteStream()`][]. If `path` is passed as a string, then `writeStream.path` will be a string. If `path` is passed as a `Buffer`, then `writeStream.path` will be a `Buffer`. +### writeStream.pending +<!-- YAML +added: REPLACEME +--> + +* {boolean} + +This property is `true` if the underlying file has not been opened yet, +i.e. before the `'ready'` event is emitted. + ## fs.access(path[, mode], callback) <!-- YAML added: v0.11.15 diff --git a/doc/api/net.md b/doc/api/net.md index 07c88cc885..2ce807ec77 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -724,6 +724,17 @@ The numeric representation of the local port. For example, `80` or `21`. Pauses the reading of data. That is, [`'data'`][] events will not be emitted. Useful to throttle back an upload. +### socket.pending +<!-- YAML +added: REPLACEME +--> + +* {boolean} + +This is `true` if the socket is not connected yet, either because `.connect()` +has not yet been called or because it is still in the process of connecting +(see [`socket.connecting`][]). + ### socket.ref() <!-- YAML added: v0.9.1 @@ -1167,6 +1178,7 @@ Returns `true` if input is a version 6 IP address, otherwise returns `false`. [`socket.connect(options)`]: #net_socket_connect_options_connectlistener [`socket.connect(path)`]: #net_socket_connect_path_connectlistener [`socket.connect(port, host)`]: #net_socket_connect_port_host_connectlistener +[`socket.connecting`]: #net_socket_connecting [`socket.destroy()`]: #net_socket_destroy_exception [`socket.end()`]: #net_socket_end_data_encoding_callback [`socket.pause()`]: #net_socket_pause |