摘要: const EventEmitter = require("events"); //1 创建发射器 const emitter = new EventEmitter(); // 2 监听 某一个事件 on || addlistener emitter.on('click',(args)=>{ con 阅读全文
posted @ 2021-04-09 14:54 13522679763-任国强 阅读(49) 评论(0) 推荐(0)
摘要: const fs = require('fs'); // 读取文件的信息 const filepath = "./abc.txt"; // 1 同步操作 // const info = fs.statSync(filepath); // console.log('后续需要执行的代码'); // co 阅读全文
posted @ 2021-04-09 12:11 13522679763-任国强 阅读(67) 评论(0) 推荐(0)
摘要: const path = require('path'); // const basePath = '/user/eric'; // const filename = 'adb.txt'; // // 路径拼接 // const filepath = path.resolve(basePath,fi 阅读全文
posted @ 2021-04-09 10:27 13522679763-任国强 阅读(44) 评论(0) 推荐(0)