【文件属性】:
文件名称:co-walk:遍历文件树并返回文件列表
文件大小:5KB
文件格式:ZIP
更新时间:2021-05-08 19:01:43
JavaScript
同走
遍历文件树并返回文件列表
安装
$ npm install co-walk
例子
var path = __dirname + '/app'
var files = yield walk ( path , {
symlinks : true ,
ignore : [ 'art/**' , 'node_modules' ]
} )
// -> ['/home/user/app/.gitignore', ...]
原料药
*步行(路径,选择)
遍历文件树并返回文件列表
path :文件夹的完整路径
opts :
symlinks :遵循符号链接并返回原点路径[false]
ignore :要忽略的文件夹和文件的列表,或谓词函数(filename, relPath, fullPath) => boolean
测验
$ make test
执照
麻省理工学院
【文件预览】:
co-walk-master
----index.js(1KB)
----package.json(569B)
----readme.md(659B)
----test()
--------index.js(2KB)
--------fixtures()
----.gitignore(12B)
----Makefile(146B)
----history.md(18B)