Skip to content
This repository was archived by the owner on May 4, 2018. It is now read-only.
This repository was archived by the owner on May 4, 2018. It is now read-only.

Please expose bufs in uv_fs_t's result for uv_fs_read operations. #1557

@creationix

Description

@creationix

In my bindings, uv_fs_read is the only place in all of libuv where I have to externally track the read buffer to get the result. In others like uv_read, the callback gives me a uv_buf_t which contains the buffer I allocated for the read (in uv_alloc_cb). This makes is easy to both get the result and free my data when I'm done.

It would be awesome and save me a pointer in my reqs if uv_fs_read did the same thing and gave me back the buffer somehow in the result. It appears the req->ptr member isn't used for anything in this fs operation but I'm not entirely sure how you would fit both the bufs array and the length of the array.

For my uses, the array is always length 1 so that's not a problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions