Skip to content

Documentation for "path", "bytesRead", "bytesWritten" properties should also be in stream.html, not just fs.html #14448

@lll000111

Description

@lll000111

Relating to #4327 and #4368

I just searched and searched and had to resort to various tricky Google queries to find that the path property of stream(!) objects is not documented on the "stream" doc page - but on the "fs" page.

https://nodejs.org/dist/latest-v8.x/docs/api/fs.html#fs_writestream_path

I think this belongs to https://nodejs.org/dist/latest-v8.x/docs/api/stream.html#stream_class_stream_writable and https://nodejs.org/dist/latest-v8.x/docs/api/stream.html#stream_class_stream_readable (too)

On that note, I find it highly confusing that there is a class fs.WriteStream (same for ReadStream) documented. Sure, it says "is a WriteStream", but combined with the fact that the documentation is DIFFERENT for the class on the two pages leads to the assumption that maybe it indeed is something different? I had to check the code in lib/fs.js to make sure it really is the same class.

So maybe there should be only one location for stream class documentation - and that should be under "streams"?

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to the documentations.fsIssues and PRs related to the fs subsystem / file system.streamIssues and PRs related to the stream subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions