nodefstool

0.1.1 • Public • Published

对常用node-fs模块进行了封装

将原生的fs模块进行promise封装,可以快速的使用async_await模式

包括:

  • read(path) 读文件
  • write(path,content)写文件
  • mkdir(path) 创建目录
  • rename(oldPath,newPath) 重命名
  • readDir(path,options) 读取目录

安装

npm install nodefstool

简单使用案例

async function test(){
  let files = await readDir('../');
}
test()

Package Sidebar

Install

npm i nodefstool

Weekly Downloads

1

Version

0.1.1

License

ISC

Unpacked Size

2.58 kB

Total Files

3

Last publish

Collaborators

  • constown