boxlang-file-watchers

Monitor BoxLang file-system changes using watcherNew and watcherStart APIs.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ortus-boxlang/skills --skill boxlang-file-watchers-ortus-boxlang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: boxlang-file-watchers
Source: https://github.com/ortus-boxlang/skills/tree/main/boxlang-developer/file-watchers
Command: npx skills add https://github.com/ortus-boxlang/skills --skill boxlang-file-watchers-ortus-boxlang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

BoxLang filesystem watchers provide a standardized, reactive mechanism to monitor directories, detect changes, and drive automated workflows in BoxLang applications.

Core Features & Use Cases

  • Define watchers with watcherNew and manage their lifecycle using watcherStart, watcherStop, and watcherRestart.
  • Support recursive monitoring, debounce, throttle, atomicWrites, and errorThreshold to reduce noise and improve reliability.
  • Use listener patterns (closure, struct, class name string or class instance) to handle created, modified, deleted, and overflow events with robust error handling.

Quick Start

Register a watcher in Application.bx, start it, and handle events with a configured listener.

Frequently Asked Questions about boxlang-file-watchers

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I monitor filesystem changes in BoxLang applications?

To monitor filesystem changes in BoxLang, you use watcherNew to register a path and watcherStart to begin tracking. You configure a listener to handle created, modified, deleted, and overflow events for automated workflows.

What is the best way to trigger asset regeneration and live reload in BoxLang?

The best way to trigger asset regeneration or live reload is by configuring a BoxLang filesystem watcher. You set up a listener to catch directory modifications and use debounce to reduce noise from rapid file saves.

How do I prevent duplicate events when monitoring files in BoxLang?

To prevent duplicate events in BoxLang filesystem watchers, you apply debounce and throttle configurations. These settings reduce noise by grouping rapid successive file modifications into a single triggered event.

Can I use closures and class instances as listeners for BoxLang watchers?

Yes, BoxLang watchers support multiple listener patterns including closures, structs, class name strings, and class instances. This allows flexible handling of created, modified, deleted, and overflow events with robust error handling.

How do I handle file write interruptions during BoxLang ETL workflows?

To handle file write interruptions during BoxLang ETL workflows, you enable atomicWrites in your watcher configuration. You can also configure an errorThreshold to manage reliability and prevent watcher failures.

Does BoxLang support recursive directory monitoring for build pipelines?

Yes, BoxLang supports recursive directory monitoring for build pipelines. You enable the recursive option when configuring your watcher with watcherNew to track changes across entire local file trees.