fuse-friends / fuse-native

Multithreaded FUSE bindings for Node JS.
203 stars 29 forks source link

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

Open metachris opened 3 years ago

metachris commented 3 years ago

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.