let fs = require('fs'); fs.readFile('./a.txt',(err,data)=>{ if(err){ console.log(err); }else{ console.log(data.toString()); } }) fs.writeFile('b.txt','月薪2元',{flag:"a"},(err)=>{ if(err){ throw err } })
let fs = require('fs'); fs.readFile('./a.txt',(err,data)=>{ if(err){ console.log(err); }else{ console.log(data.toString()); } }) fs.writeFile('b.txt','月薪2元',{flag:"a"},(err)=>{ if(err){ throw err } })