4.1.0 • Published 4 months ago
@rowanmanning/list-all-files v4.1.0
@rowanmanning/list-all-files
List all files in a directory recursively.
Table of Contents
Requirements
This library requires the following to run:
- Node.js 18+
Usage
Install with npm:
npm install @rowanmanning/list-all-files
Load the library into your code with a require
call:
const listAllFiles = require('@rowanmanning/list-all-files');
Asynchronous Interface
List all files in a directory asynchronously, using promises or async
/await
:
listAllFiles('./directory-path').then(files => {
// files is an array of strings, each being the path to a file
});
or
const files = await listAllFiles('./directory-path');
// files is an array of strings, each being the path to a file
Synchronous Interface
List all files in a directory synchronously:
const files = listAllFiles.sync('./directory-path');
// files is an array of strings, each being the path to a file
Contributing
The contributing guide is available here. All contributors must follow this library's code of conduct.
License
Licensed under the MIT license. Copyright © 2020, Rowan Manning
4.1.0
4 months ago
3.0.3
10 months ago
3.0.2
10 months ago
4.0.0
8 months ago
3.0.1
1 year ago
3.0.0
1 year ago
2.2.4
1 year ago
2.2.3
1 year ago
2.2.2
2 years ago
2.2.1
2 years ago
2.2.0
2 years ago
2.1.1
2 years ago
2.1.0
2 years ago
0.0.0
2 years ago
2.0.1
2 years ago
2.0.0
2 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago