Skip to content

code: <files-list> get file path ❤️ Is work ✅

License

Notifications You must be signed in to change notification settings

chinanf-boy/files-list

Repository files navigation

files-list Build Status

「 get path dir/+child all file path 」

Install

npm install files-list
yarn add files-list

Usage

const filesList = require('files-list');

(async () => {
    let results = await filesList('./test.js')
//  ['.editorconfig',
//   '.gitattributes',
//   '.gitignore',
//   '.npmrc',
//   '.travis.yml',
//   '.yo-rc.json',
//   'files-list.js',
//   'license',
//   'package.json',
//   'readme.md',
//   'test.js',
//   'yarn.lock' ]
});)

filesList.sync() is sync

API

filesList(path, [options])

path

name: path
Type: string
Desc: path file/dir

options

deep
name: deep
Type: number | string{'all'}
Default: 1
Desc: how deep you want
ignore
name: ignore
Type: Array
Default: ['.git', 'node_modules']
Desc: ignore Dir name you want

filesList.sync(path, [options])

split the code to files-list-sync

cancat

Use by

License

MIT © chinanf-boy

About

code: <files-list> get file path ❤️ Is work ✅

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published