2.0.2 • Published 8 years ago

deep-dir v2.0.2

Weekly downloads
1
License
ISC
Repository
-
Last release
8 years ago

#deepDir a personal node module

Build Status

Description

深度遍历文件夹。 deep scan someone path.

Install

npm install deep-dir

How to

version >= 2.*

var deepDir = require('deep-dir');
var path = './';

deepDir(path, /* maxPathDepth = 99, */ function (path, stat) {
	// do somthing
});

version ~ 1.*

deepDir(path, {
    filters: {
        '.css' : cssFilter,
        '.js': jsFilter,
        '.html': htmlFilter
    },
    depth: depth // {int} depth "path depth"
});

Events

  • isFile

    	`function(data) {}`
  • isDirectory

    	`function(data) {}`
  • error

    	`function(error) {}`
  • overMaxDepth

    	`function(data) {}`
  • goThrough

    	`function(data) {}`

while data is

{
	path: 'current path',
	base: 'base name of path',
	stat: 'file stat of path',
	depth: 'current depth value'
}
2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

9 years ago

1.0.0

9 years ago