Skip to content

fs.read documentation does not specify how to detect EOF condition #35363

@joepie91

Description

@joepie91

As far as I can tell, neither fs.read nor FileHandle#read specify how to detect when the end of a file has been reached, nor can I find this information elsewhere in the fs documentation.

The fs.createReadStream implementation suggests that the answer to this question is "when bytesRead is 0", but this should be added to the documentation if that is indeed the correct way to detect this condition.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions