NODEJS[01]:fs模块_写入文件
·
Yin灏
const fs = require("fs");
fs.writeFile("./file.txt", "三人行必有我师", (err) => {
if (err) {
console.log("写入失败");
return;
}
console.log("写入成功");
});
const fs = require("fs");
fs.writeFile("./file.txt", "三人行必有我师", (err) => {
if (err) {
console.log("写入失败");
return;
}
console.log("写入成功");
});