boxlang-file-watchers

Automate BoxLang filesystem monitoring with watcher lifecycle BIFs and listener patterns.

16|78|Updated Nov 28, 2014
One-click install
npx skills add https://github.com/ortus-docs/coldbox-docs --skill boxlang-file-watchers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: boxlang-file-watchers
Source: https://github.com/ortus-docs/coldbox-docs/tree/main/.agents/skills/boxlang-file-watchers
Command: npx skills add https://github.com/ortus-docs/coldbox-docs --skill boxlang-file-watchers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

BoxLang filesystem watchers provide a structured way to react to file create/modify/delete events with deterministic lifecycle controls across applications.

Core Features & Use Cases

  • Watcher lifecycle support with watcherNew/watcherStart/watcherStop and WatcherInstance APIs
  • Recursive directory monitoring, debounce, throttle, and atomicWrites tuning
  • Flexible listener patterns (closure, struct, class, class-name string) for event handling

Quick Start

Create a watcher using watcherNew with a name and paths, attach a listener, then call start() to begin monitoring.

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 real time within a BoxLang application?

Filesystem monitoring in BoxLang is handled by creating a watcher with watcherNew, attaching a listener to process file events, then calling start() to begin live directory tracking and automated event handling.

What is the best way to debounce file modify events when watching directories in BoxLang?

Debouncing file events in BoxLang watchers is configured through tuning options that throttle rapid successive modifications, ensuring your listener logic receives a single aggregated event instead of redundant triggers.

Can I attach different types of event listeners to a BoxLang filesystem watcher?

BoxLang watchers support flexible listener patterns including closures, structs, classes, and class-name strings, allowing you to structure file event handling logic to match your application architecture.

How do I recursively monitor subdirectories for file changes using BoxLang?

Recursive directory monitoring in BoxLang is supported natively by the watcher configuration, allowing a single watcher instance to track file create, modify, and delete events across nested folder structures.

What lifecycle controls are available for starting and stopping filesystem watchers in BoxLang?

BoxLang provides watcherNew, watcherStart, and watcherStop BIFs alongside WatcherInstance APIs, giving you deterministic control over when filesystem event monitoring begins and ends within your application lifecycle.

Why does my BoxLang file watcher trigger multiple events for a single file save?

Multiple triggers during a single save often result from unconfigured atomicWrites or missing debounce settings; tuning these options ensures the watcher consolidates rapid file system events into expected listener calls.