Skip to content

Commit ac81e36

Browse files
committed
Merge pull request #21 from darobin/patch-1
Clarify that the end() callback is different from the end of the stream
2 parents 6e5e4fb + 4dcdccf commit ac81e36

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@ See `addFile()` for the meaning of `mtime` and `mode`.
153153
#### end([finalSizeCallback])
154154

155155
Indicates that no more files will be added via `addFile()`, `addReadStream()`, or `addBuffer()`.
156-
Some time after calling this function, `outputStream` will be ended.
156+
Some time after calling this function, `outputStream` will be ended. Note that this entails that you cannot rely on this
157+
callback to know when you are done producing output. If for instance you are creating a zip archive on disk, you will need
158+
to listen to the `end` event on the `outputStream` before notifying consumers of that file.
157159

158160
If specified and non-null, `finalSizeCallback` is given the parameters `(finalSize)`
159161
sometime during or after the call to `end()`.

0 commit comments

Comments
 (0)