Skip to content

read(..): when writing binary data in a Buffer, it throws ERR_INVALID_ARG_TYPE "TypeError: argument must be a string" #30

@metachris

Description

@metachris

https://github.com/fuse-friends/fuse-native/blob/master/example.js#L63

buf.write(slice) with a buffer containing binary data doesn't work. It throws ERR_INVALID_ARG_TYPE "TypeError: argument must be a string"

How would I return binary data? If I just do buf.write(slice.toString()) then the encoding seems incorrect and the hex data received by the terminal is wrong.

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