Skip to content
Next Next commit
Add 'close' events to fs.ReadStream and fs.WriteSTream
  • Loading branch information
Jenna Vuong
Jenna Vuong committed May 1, 2016
commit 9d48b5dc549e6fa99f2060280b175f2d3909f546
8 changes: 8 additions & 0 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ Stop watching for changes on the given `fs.FSWatcher`.

Emitted when the ReadStream's file is opened.

### Event: 'close'

Emitted when a ReadStream's file has ended or closed. Comes from fs.close() method.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe something more specific like "Emitted when the ReadStream's underlying file descriptor has been closed" and similarly for WriteStream?


### readStream.path

The path to the file the stream is reading from as specified in the first
Expand Down Expand Up @@ -238,6 +242,10 @@ on Unix systems, it never was.

Emitted when the WriteStream's file is opened.

### Event: 'close'

Emitted when a WriteStream's file has ended or closed. Comes from fs.close() method.

### writeStream.bytesWritten

The number of bytes written so far. Does not include data that is still queued
Expand Down