talira

watcher (Dart)

A file system watcher for Dart

open sourceBSD-3-Clausefree

watcher is the Dart team's file system watcher: it monitors the contents of directories and sends events when files are added, removed or modified. Its guarantee is that events converge on the state of the file system, so a model rebuilt from them matches what's on disk once changes stop; it doesn't promise one event per change, since platform notifications are batched, and it resolves them by reading the paths involved. It lives in the dart-lang/tools repository.

Problems it solves

  • rebuild when a file changes in my Dart tool
  • watch a folder for new files from a Dart program
  • react to file edits in a Dart command-line app

Features

  • watch directories for added, removed and modified files
  • events converge on the file system's state

Alternatives

The same job

These do what watcher (Dart) does.

  1. Watchman A file watching service that records changes and triggers actions
  2. entr Run arbitrary commands when files change
  3. Air Live reload for Go apps

Compare watcher (Dart) with the top 3