npm.io
0.0.1 • Published 6 years ago

@spatocode/dirwalk

Licence
MIT
Version
0.0.1
Deps
0
Size
6 kB
Vulns
0
Weekly
0

dirwalk

Directory tree traversal in nodejs

Installation

$ npm install @spatocode/dirwalk

Usage

const dirwalk = require("@spatocode/dirwalk");

// Asynchronous function
dirwalk.walk("path/to/dir", (err, path, info) => {
    if (err) {
        throw err;
    }
    console.log(path, " : ", info.size);
});

// Synchronous function
var files = dirwalk.walkSync("path/to/dir");
console.log(files);

License

MIT License Copyright (c) 2019 Ekene Izukanne

Keywords