读取普通文件:https://blog.csdn.net/bnzjxbsjjdnnxj/article/details/123831042
https://wenku.baidu.com/view/61cabadbfa0f76c66137ee06eff9aef8941e4816.html
读取json文件呢?:https://blog.csdn.net/weixin_58206564/article/details/120248772
http://www.fairysoftware.com/nodejs_json.html
>>nodejs读写txt:https://wenku.baidu.com/view/3ee965e08aeb172ded630b1c59eef8c75fbf95ba.html
https://blog.csdn.net/qq_41244810/article/details/124445499
var fs = require("fs"); var data = "hello 雨林博客"; fs .writeFile("c:a.txt", data, "ascii", function(err){ if(err){ console.1og("写入文件失败"); }else{ console. log("保存成功,赶紧去看看乱码吧"); } })
[注意:默认情况下,数据编码为utf8;mode=438 ;flag=w]
http://www.yl-blog.com/article/253.html
https://blog.csdn.net/weixin_32258195/article/details/113018054
>>node.js中的fs.writeFileSync方法使用说明:https://www.jb51.net/article/58474.htm