then-fs的使用

安装

npm i then-fs

使用

fs.readFile('1.txt', 'utf-8').then(res => {
  console.log('读取成功:' + res);
}).catch(err => {
  console.log('读取失败:' + err);
})

已发布

分类

来自

标签:

评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注