摘要: const http = require("http"); const server = http.createServer((req, res) => { res.setHeader("content-type", "text/html;charset=utf-8"); // 提取http报文 / 阅读全文
posted @ 2024-02-19 15:49 QinHaoRan 阅读(29) 评论(0) 推荐(0)
摘要: // resolve 拼接 // const ad = path.resolve(__dirname, "./ccc/00-aa.txt"); // console.log(ad); // sep 分隔符;//windows \ linux / // console.log(path.sep); / 阅读全文
posted @ 2024-02-19 11:02 QinHaoRan 阅读(9) 评论(0) 推荐(0)
摘要: // 查看资源状态方法 fs.stat("zzsy.txt", (err, stats) => { if (err) { console.log(err); } console.log(stats); // stats.isFile(); // 验证是不是文件 isFile // 验证是不是文件夹 阅读全文
posted @ 2024-02-19 09:27 QinHaoRan 阅读(31) 评论(0) 推荐(0)