https://github.com/zakodium/fs-synchronizer
Recursively find files in folder and extract file informations.
https://github.com/zakodium/fs-synchronizer
Last synced: 5 months ago
JSON representation
Recursively find files in folder and extract file informations.
- Host: GitHub
- URL: https://github.com/zakodium/fs-synchronizer
- Owner: zakodium
- License: mit
- Created: 2021-03-12T09:51:36.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-01T15:32:38.000Z (almost 5 years ago)
- Last Synced: 2025-10-28T18:51:36.978Z (8 months ago)
- Language: TypeScript
- Homepage: https://zakodium.github.io/fs-synchronizer/
- Size: 113 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# fs-synchronizer
[![NPM version][npm-image]][npm-url]
[![build status][ci-image]][ci-url]
[![Test coverage][codecov-image]][codecov-url]
[![npm download][download-image]][download-url]
Recursively find files in folder and extract file informations.
## Installation
`$ npm i fs-synchronizer`
## Usage
```js
import { FileSynchronizer } from 'fs-synchronizer';
const sync = new FileSynchronizer({
root: 'test-utils',
maxDepth: 2,
patterns: [{ type: 'include', pattern: 'a*' }],
});
sync.on('file', (fileInfo) => {
console.log(`Found file: ${fileInfo.filename}`);
});
sync.on('excluded-file', (fileInfo) => {
console.log(`Excluded file: ${fileInfo.filename}`);
});
sync.on('end', () => {
console.log('Finished walking');
});
await sync.walk();
```
## License
[MIT](./LICENSE)
[npm-image]: https://img.shields.io/npm/v/fs-synchronizer.svg
[npm-url]: https://www.npmjs.com/package/fs-synchronizer
[ci-image]: https://github.com/zakodium/fs-synchronizer/workflows/Node.js%20CI/badge.svg?branch=main
[ci-url]: https://github.com/zakodium/fs-synchronizer/actions?query=workflow%3A%22Node.js+CI%22
[codecov-image]: https://img.shields.io/codecov/c/github/zakodium/fs-synchronizer.svg
[codecov-url]: https://codecov.io/gh/zakodium/fs-synchronizer
[download-image]: https://img.shields.io/npm/dm/fs-synchronizer.svg
[download-url]: https://www.npmjs.com/package/fs-synchronizer