Skip to content

createReadStream/createWriteStream should support FileHandle #35240

Description

@ronag

Currently only raw file descriptors are supported. Should we allow for a FileHandle to be passed as fd?

Activity

  1. added
    fsIssues and PRs related to file-system APIs and the fs module.
    feature requestIssues requesting new Node.js features.
    on Sep 17, 2020
  2. mmomtchev commented on Oct 13, 2020

    @mmomtchev
    Contributor

    Any advantages over simply using FileHandle.fd? 😃

  3. ronag commented on Oct 13, 2020

    @ronag
    MemberAuthor

    Any advantages over simply using FileHandle.fd? 😃

    Yes, closing the file handle would close the fd which would corrupt the stream, i.e. the reference counting is bypassed.

  4. mmomtchev commented on Oct 30, 2020

    @mmomtchev
    Contributor

    Suddenly this appears much more needed, I will take it of no one is already working on it?

  5. ronag commented on Oct 30, 2020

    @ronag
    MemberAuthor

    @mmomtchev go for it!

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

    feature requestIssues requesting new Node.js features.fsIssues and PRs related to file-system APIs and the fs module.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions