An open API service indexing awesome lists of open source software.

https://github.com/spatocode/dirwalk

Directory tree traversal in nodejs
https://github.com/spatocode/dirwalk

Last synced: 3 months ago
JSON representation

Directory tree traversal in nodejs

Awesome Lists containing this project

README

          

# dirwalk

Directory tree traversal in nodejs

## Installation

```sh
$ npm install @spatocode/dirwalk
```

## Usage

```js
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](http://www.github.com/spatocode/dirwalk/blob/master/LICENSE)
Copyright (c) 2019 Ekene Izukanne