npm

@guanghechen/helper-fs
TypeScript icon, indicating that this package has built-in type declarations

6.0.0-alpha.7 • Public • Published

@guanghechen/helper-fs


Provide some enhanced methods base on node:fs.

Install

  • npm

    npm install --save @guanghechen/helper-fs
  • yarn

    yarn add @guanghechen/helper-fs

Usage

Name Description
collectAllFiles (async) Collect all files under the given directory
collectAllFilesSync Collect all files under the given directory (synchronizing)
emptyDir (async) Remove all files under the given directory path.
ensureCriticalFilepathExistsSync Ensure critical filepath exists
isDirectorySync Check whether if the dirpath is a directory path
isFileSync Check whether if the filepath is a file path
isNonExistentOrEmpty Check whether if the dirPath is a non-existent path or empty folder
mkdirsIfNotExists Create a path of directories
writeFile Same as the writeFile method provided in node:fs/promises, except that it will ensure that the parent path exists.

Readme

Keywords

Package Sidebar

Install

npm i @guanghechen/helper-fs

Weekly Downloads

128

Version

6.0.0-alpha.7

License

MIT

Unpacked Size

38.8 kB

Total Files

8

Last publish

Collaborators

  • lemonclown