The r_stream outputs objects like {fullPath: String, stats: Object} but the pipe expects strings. So, I get the following error:
The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Object
Question
How do I process r_stream data chunks so it returns entry.fullPath (strings) instead of entry (object) into the pipeline? I tried adding the following, but I get the same error:
Hey @paulmillr Sorry for asking questions here, but I'm having troubles returning data from the emitter.
I'm trying to recursively walk a directory and write all paths into a file using this module and Node's pipeline.
The
r_stream
outputs objects like{fullPath: String, stats: Object}
but the pipe expects strings. So, I get the following error:Question
How do I process
r_stream
data chunks so it returnsentry.fullPath
(strings) instead ofentry
(object) into the pipeline? I tried adding the following, but I get the same error:How do I properly return the
entry.fullPath
string fromr_stream.on('data'...
into the pipeline?