انتقل إلى المحتوى
#0841
Files

Every folder on the box can have a doorbell

Clients drop files into a shared folder that mounts in their Finder. You wanted to know when, without polling and without writing a bot.

One POST creates a watcher on that path: recursive, created events only, a 100 ms coalesce so a forty-file drop is one burst, not forty. The watcher publishes its events as a Server-Sent Events stream at its own URL. On the studio's front desk, a $4 Wi-Fi board holds that stream open and lights a lamp when an event arrives. After a power cut it reconnects with since_id and replays what it missed.

The same stream feeds a browser tab, a script, or an agent. The lamp is just the smallest consumer that fits on a desk.

Every folder on the box can have a doorbell, and the doorbell is a URL.