You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm somewhat new to streams, so I assume I'm missing something basic here.
Assuming filePath is defined and associated with a large file, why would end events be emitted, but line events never are? mutatedBuffer isn't really important here, just part of the context. Thanks in advance.
functionwriteFileLineByLine(filePath){constmutatedBuffer=newMutatedFileBuffer(filePath);constlineReader=newLineByLineReader(filePath);lineReader.on('line',(line)=>{// never calledconstmutatedLine=`${line} plus appended`;mutatedBuffer.push(mutatedLine);});lineReader.on('error',(err)=>{// never calledconsole.error(err);});lineReader.on('end',()=>{// calledmutatedBuffer.store();});returnlineReader;}
The text was updated successfully, but these errors were encountered:
Hi, I'm somewhat new to streams, so I assume I'm missing something basic here.
Assuming
filePath
is defined and associated with a large file, why wouldend
events be emitted, butline
events never are?mutatedBuffer
isn't really important here, just part of the context. Thanks in advance.The text was updated successfully, but these errors were encountered: