Skip to content

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

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"?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to Node.js documentation.fsIssues and PRs related to file-system APIs and the fs module.streamIssues and PRs related to Node.js streams.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions