1.0.0 • Published 3 years ago

find-files-array v1.0.0

Weekly downloads
1
License
ISC
Repository
-
Last release
3 years ago
npm i -S find-files

使用

const ff = require("find-files-array")

let res = ff(
	{
      	paths: [
            "C:\\Users\\EDZ\\Desktop\\aaa",  // 待查找的目录1
            "C:\\Users\\EDZ\\Desktop\\pk" // 待查找的目录2
      	],
      	type: [".md", ".json"], // 需要的文件类型
      	structure: true // 保持文件目录结构输出 默认false
    }
)

console.log(res)

option

  • paths:Array,待查找的目录数组
  • type:Array,匹配的文件类型
  • structure:Boolean,返回值是否保持文件结构 ,默认false,输出一维数组