0.1.1 • Published 4 years ago

nodefstool v0.1.1

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

对常用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()