slicks-fswalker

This module helps to recursively list file system by various methods; it allows wildcards, globs and file names.

Usage no npm install needed!

<script type="module">
  import slicksFswalker from 'https://cdn.skypack.dev/slicks-fswalker';
</script>

README

slicks-fswalker

This module helps to recursively list file system by various methods; it allows wildcards, globs and file names.

Installation

    npm install slicks-fswalker

Usage, Node only

Recursive

    var walker = require('slicks-fswalker');
    walker.walk("../**/*.js", function(e, ls){
        if(e) return console.log(e);
        console.log(ls);
    });

Non Recursive

    var walker = require('slicks-fswalker');
    walker.walk("../*.js", function(e, ls){
        if(e) return console.log(e);
        console.log(ls);
    });

Specific File

    var walker = require('slicks-fswalker');
    walker.walk("../some_dir/somefile.json", function(e, ls){
        if(e) return console.log(e);
        console.log(ls);
    });
    

Enjoy!