5.1.0 • Published 7 months ago

@rowanmanning/list-all-files v5.1.0

Weekly downloads
35
License
MIT
Repository
github
Last release
7 months ago

@rowanmanning/list-all-files

List all files in a directory recursively.

!WARNING This library will be deprecated in April 2026 to coincide with the end-of-life date for Node.js 20. This is because the native fs.glob and fs.globSync methods in Node.js 22 and above provide the same functionality.

Requirements

This library requires the following to run:

Usage

Install with npm:

npm install @rowanmanning/list-all-files

Asynchronous Interface

Load the library into your code with require:

const { listAllFiles } = require('@rowanmanning/list-all-files');

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

Load the library into your code with require:

const { listAllFilesSync } = require('@rowanmanning/list-all-files');

List all files in a directory synchronously:

const files = listAllFilesSync('./directory-path');
// files is an array of strings, each being the path to a file

Migration

A new major version of this project is released if breaking changes are introduced. We maintain a migration guide to help users migrate between these versions.

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

5.1.0

7 months ago

5.0.0

10 months ago

4.2.1

1 year ago

4.2.0

1 year ago

4.1.0

2 years ago

3.0.3

2 years ago

3.0.2

2 years ago

4.0.0

2 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.2.4

3 years ago

2.2.3

3 years ago

2.2.2

3 years ago

2.2.1

3 years ago

2.2.0

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

0.0.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago