Skip to main content

watch_directory

Function watch_directory 

Source
pub async fn watch_directory(
    root: &Path,
    output_dir: &Path,
) -> Result<(), WatchError>
Expand description

Watch root for file changes and trigger rebuilds into output_dir.

This is an async loop that runs until cancelled. On each batch of debounced file changes, it logs the changed paths and invokes an incremental rebuild (only changed files have their cache invalidated).

ยงArguments

  • root - Directory to watch recursively.
  • output_dir - Where to write rebuild output.