From ed2438c6815a4d093c6d1cbe2a1ceee6bf92f118 Mon Sep 17 00:00:00 2001 From: Hitesh Sharma Date: Sun, 9 May 2021 19:59:52 +0530 Subject: [PATCH 1/6] Fixes: https://github.com/nodejs/node/issues/38606 --- doc/api/fs.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/api/fs.md b/doc/api/fs.md index edd7054d6aab36..29191e693623fa 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -5968,6 +5968,15 @@ added: v11.2.0 This property is `true` if the underlying file has not been opened yet, i.e. before the `'ready'` event is emitted. +#### `writeStream.close(callback)` + + +Closes the specified `writeStream`. Optionally accepts a +callback that will be executed once the `writeStream` +is closed. + ### `fs.constants` * {Object} From 4f9d89a98e8f146f33a81a0fc98aa398d3f7aaaa Mon Sep 17 00:00:00 2001 From: Hitesh Sharma Date: Mon, 10 May 2021 11:03:13 +0530 Subject: [PATCH 2/6] Fixes as per suggestions --- doc/api/fs.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index 29191e693623fa..c9c767c920446f 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -5968,11 +5968,14 @@ added: v11.2.0 This property is `true` if the underlying file has not been opened yet, i.e. before the `'ready'` event is emitted. -#### `writeStream.close(callback)` +#### `writeStream.close([callback])` +* `callback` {Function} + * `err` {Error} + Closes the specified `writeStream`. Optionally accepts a callback that will be executed once the `writeStream` is closed. From 003b03489bd9059b01aa059ad0b930647007c7f9 Mon Sep 17 00:00:00 2001 From: Hitesh Sharma Date: Tue, 11 May 2021 14:24:30 +0530 Subject: [PATCH 3/6] Removed trailing whitespace --- doc/api/fs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index c9c767c920446f..ace1313b527356 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -5975,7 +5975,7 @@ added: REPLACEME * `callback` {Function} * `err` {Error} - + Closes the specified `writeStream`. Optionally accepts a callback that will be executed once the `writeStream` is closed. From 8478945986868c7a4e0068aedfef0602c0a87955 Mon Sep 17 00:00:00 2001 From: Hitesh Sharma Date: Tue, 11 May 2021 18:04:22 +0530 Subject: [PATCH 4/6] Moved the close section just after bytesWritten --- doc/api/fs.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index ace1313b527356..b8e4f3d28fac52 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -5948,6 +5948,18 @@ added: v0.4.7 The number of bytes written so far. Does not include data that is still queued for writing. +#### `writeStream.close([callback])` + + +* `callback` {Function} + * `err` {Error} + +Closes the specified `writeStream`. Optionally accepts a +callback that will be executed once the `writeStream` +is closed. + #### `writeStream.path` - -* `callback` {Function} - * `err` {Error} - -Closes the specified `writeStream`. Optionally accepts a -callback that will be executed once the `writeStream` -is closed. - ### `fs.constants` * {Object} From 197e786491069cca134f3f7532296fbc77f150a6 Mon Sep 17 00:00:00 2001 From: Hitesh Sharma Date: Wed, 12 May 2021 00:01:51 +0530 Subject: [PATCH 5/6] Added version number --- doc/api/fs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index b8e4f3d28fac52..69d55c5326dc19 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -5950,7 +5950,7 @@ for writing. #### `writeStream.close([callback])` * `callback` {Function} From 92e19183c1bf7a948cd464d963b4a4daa954fafc Mon Sep 17 00:00:00 2001 From: Hitesh Sharma <42701929+ihiteshsharma@users.noreply.github.com> Date: Fri, 14 May 2021 22:46:29 +0530 Subject: [PATCH 6/6] Update doc/api/fs.md Co-authored-by: Rich Trott --- doc/api/fs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index 69d55c5326dc19..f085409d3b6056 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -5956,7 +5956,7 @@ added: v0.9.4 * `callback` {Function} * `err` {Error} -Closes the specified `writeStream`. Optionally accepts a +Closes `writeStream`. Optionally accepts a callback that will be executed once the `writeStream` is closed.