Nocturnal Practitioners of Magic

    deep-dir

    2.0.2 • Public • Published

    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'
    }
    

    Keywords

    none

    Install

    npm i deep-dir

    DownloadsWeekly Downloads

    8

    Version

    2.0.2

    License

    ISC

    Last publish

    Collaborators

    • iahu