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
- Host: GitHub
- URL: https://github.com/spatocode/dirwalk
- Owner: spatocode
- License: mit
- Created: 2019-12-29T00:33:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-30T23:08:24.000Z (over 6 years ago)
- Last Synced: 2025-03-18T06:16:27.713Z (over 1 year ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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