摘要:
写数据流 const fs = require('fs'); let str = ''; for (let i = 0; i < 1e4; i++) { str += `写入数据${i}\n`; } const writeStream = fs.createWriteStream('./data/o 阅读全文
摘要:
创建一个upload文件夹 const fs = require('fs'); // 创建文件夹 const mkdir = (path) => new Promise((resolve) => { fs.mkdir(path, (err) => { resolve({ err }); }); }) 阅读全文