I thought it was a silly question, but...
I'd tried try writeExistingFile(path, fileName, text)
but it replace the file.
I'd tried writeFile(path, fileName, text, true)
, the same
I'd tried writeFile(path, fileName, text, false)
and I got PATH_EXIST_ERROR
I can read the file, append the newline, write the file... but it seems a little crazy! Someone help?
P.
Try:
writeFile(path, fileName, text, {append: true, replace: false})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With