Chokidar
lastmod 2026-01-05created 2026-01-053 edits
Efficient cross-platform file watching library
About
- A tool developed to normalize file change events from various OSes and deliver them consistently, making up for the limitations of fs.watch-family APIs
- Absorbs event differences across Mac, Linux, and Windows to provide a clear event model centered on add / change / unlink
- Designed to reliably detect the atomic write pattern used by some editors and chunked writes of large files, handling events based on when the write actually completes
- Uses a non-polling structure based on fs.watch by default to keep CPU usage low
- Supports switching to polling mode in special environments such as network file systems