@licq/file

1.0.4 • Public • Published

@licq/file

封装关于文件操作相关的方法

NPM version NPM downloads

安装

npm i --save-dev @licq/file

API

listFiles

获取文件夹下所有文件,包含目录

Returns: Promise<Array[]>
Since: v1.0.0

Param Type Description
rootPath String 绝对路径

Example

const file = require('@licq/file')
const res = await file.listFiles(__dirname)
// => eg: [{path: '/Users/ostwind/batch/',size: 0,isDir: true}, {path: '/Users/ostwind/batch/package.json',size: 470,isDir: false}]

Package Sidebar

Install

npm i @licq/file

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

5.45 kB

Total Files

6

Last publish

Collaborators

  • uv-w