Skip to content

docs: document allowNetworkMounts option for directory watching#255

Merged
mishushakov merged 3 commits into
mainfrom
mishushakov/document-watcher-external-changes
Jun 15, 2026
Merged

docs: document allowNetworkMounts option for directory watching#255
mishushakov merged 3 commits into
mainfrom
mishushakov/document-watcher-external-changes

Conversation

@mishushakov

Copy link
Copy Markdown
Member

Documents the new allowNetworkMounts / allow_network_mounts option for filesystem directory watching (e2b-dev/E2B#1420). Adds a "Watching network filesystem mounts" section to docs/filesystem/watch.mdx with JS and Python examples, the envd v0.6.4 requirement, and a note that events on network mounts may be unreliable. Per the request, it also calls out that changes made by another client outside the sandbox are not propagated to the watcher.

🤖 Generated with Claude Code

Add a "Watching network filesystem mounts" section to the watch docs
covering the allowNetworkMounts / allow_network_mounts opt-in, the
envd v0.6.4 requirement, and the caveat that changes from clients
outside the sandbox are not propagated to the watcher.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cla-bot cla-bot Bot added the cla-signed label Jun 15, 2026
@cursor

cursor Bot commented Jun 15, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Documentation-only change with no runtime or API behavior impact in this repo.

Overview
Adds a Watching network filesystem mounts section to docs/filesystem/watch.mdx for allowNetworkMounts / allow_network_mounts, default rejection on NFS/CIFS/SMB/FUSE, envd v0.6.4+, unreliable events, and that only in-sandbox changes are seen. Adjusts the include-entry JS snippet highlight from {8,10} to {10}.

In the new Python example, highlight={7,14} still highlights the print loop on line 14 even though that line is not tied to the network-mount option (unlike the include-entry example where line 14 uses event.entry).

Reviewed by Cursor Bugbot for commit aea5f3e. Bugbot is set up for automated code reviews on this repo. Configure here.

@mintlify

mintlify Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
e2b 🟢 Ready View Preview Jun 15, 2026, 1:46 PM

Comment thread docs/filesystem/watch.mdx Outdated
Comment thread docs/filesystem/watch.mdx
import { Sandbox } from 'e2b'

const sandbox = await Sandbox.create()
const dirname = '/mnt/nfs-share/my-dir'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would happen if the watchDir gets called on '/mnt' with recursive: true but no allowNetworkMounts: true ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the precondition for watching anything on the network mount is allowNetworkMounts
if you don't have this enabled, no matter what else is passed will cause an error

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mishushakov mishushakov merged commit 9189e4c into main Jun 15, 2026
10 checks passed
@mishushakov mishushakov deleted the mishushakov/document-watcher-external-changes branch June 15, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants