0.0.4 • Published 4 years ago

@sagacious/fs-wrapper v0.0.4

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

🐴 fs-wrapper

enhanced the functionality of the fs module

Note

  1. Currently does not modify the node's fs module, enjoy it.

Future

  1. Two modes will be provided, one for function names that override fs, and one for templates like ${FunctionName}Pro.

  2. Rewrite unimplemented functions, currently using fs-extra package instead.

Api

  • readDirPro

    readDir's promise version, add deep option, recursively get all

    fs.readDirPro(path, {
      // other options
      deep: true
    })
  • readDirProSync

    synchronized readDirPro

  • mkdirPro

    like fs-extra's ensureDir

  • mkdirProSync

    synchronized mkdirPro