12345678910111213141516 |
- // 保存文件
- const fs = require('fs');
- const path = require('path');
- const { log_w } = require('./log-w');
- function saveFile(fileName, con) {
- fs.writeFile(`./output/${fileName}`, con, { 'flag': 'w' }, function (err) {
- if (err) throw err;
- log_w(`写入${fileName}成功`);
- });
-
- }
- exports.saveFile = saveFile;
|