You can watch a directory for changes using theDocumentation Index
Fetch the complete documentation index at: https://e2b.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
files.watchDir() method in JavaScript and files.watch_dir() method in Python.
Since events are tracked asynchronously, their delivery may be delayed.
It’s recommended not to collect or close watcher immediately after making a change.
Recursive watching
You can enable recursive watching using the parameterrecursive.
When rapidly creating new folders (e.g., deeply nested path of folders), events other than
CREATE might not be emitted. To avoid this behavior, create the required folder structure in advance.