Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

[skip ci] Release new SDK API reference doc versions

github-actions[bot]9092886866e8
diff --git a/apps/web/src/app/(docs)/docs/api-reference/js-sdk/v0.16.2-beta.52/filesystem/page.mdx b/apps/web/src/app/(docs)/docs/api-reference/js-sdk/v0.16.2-beta.52/filesystem/page.mdx
index 6b20d4b01..c206954e7 100644
--- a/apps/web/src/app/(docs)/docs/api-reference/js-sdk/v0.16.2-beta.52/filesystem/page.mdx
+++ b/apps/web/src/app/(docs)/docs/api-reference/js-sdk/v0.16.2-beta.52/filesystem/page.mdx
@@ -268,9 +268,9 @@ Information about the moved object
sandbox/filesystem/index.ts:267
-##### watch()
+##### watchDir()
-> **watch**(`path`, `onEvent`, `opts`?): `Promise`\<`WatchHandle`\>
+> **watchDir**(`path`, `onEvent`, `opts`?): `Promise`\<`WatchHandle`\>
Watches directory for filesystem events.
diff --git a/apps/web/src/app/(docs)/docs/api-reference/python-sdk/v0.17.1/sandbox_async/page.mdx b/apps/web/src/app/(docs)/docs/api-reference/python-sdk/v0.17.1/sandbox_async/page.mdx
index a7511b576..f5e5b2641 100644
--- a/apps/web/src/app/(docs)/docs/api-reference/python-sdk/v0.17.1/sandbox_async/page.mdx
+++ b/apps/web/src/app/(docs)/docs/api-reference/python-sdk/v0.17.1/sandbox_async/page.mdx
@@ -530,10 +530,10 @@ class AsyncWatchHandle()
Class representing the watch operation. It provides method to stop the watch operation.
-#### close
+#### stop
```python
-async def close()
+async def stop()
```
Stop watching the directory.
@@ -691,15 +691,15 @@ Creates a new directory and all directories along the way if needed on the speci
True if the directory was created, False if the directory already exists
-#### watch
+#### watch\_dir
```python
-async def watch(path: str,
- on_event: OutputHandler[FilesystemEvent],
- on_exit: Optional[OutputHandler[Exception]] = None,
- user: Username = "user",
- request_timeout: Optional[float] = None,
- timeout: Optional[float] = 60) -> AsyncWatchHandle
+async def watch_dir(path: str,
+ on_event: OutputHandler[FilesystemEvent],
+ on_exit: Optional[OutputHandler[Exception]] = None,
+ user: Username = "user",
+ request_timeout: Optional[float] = None,
+ timeout: Optional[float] = 60) -> AsyncWatchHandle
```
Watches directory for filesystem events.
diff --git a/apps/web/src/app/(docs)/docs/api-reference/python-sdk/v0.17.1/sandbox_sync/page.mdx b/apps/web/src/app/(docs)/docs/api-reference/python-sdk/v0.17.1/sandbox_sync/page.mdx
index 9813b6714..6d406eecf 100644
--- a/apps/web/src/app/(docs)/docs/api-reference/python-sdk/v0.17.1/sandbox_sync/page.mdx
+++ b/apps/web/src/app/(docs)/docs/api-reference/python-sdk/v0.17.1/sandbox_sync/page.mdx
@@ -470,17 +470,22 @@ class WatchHandle()
Handle for watching filesystem events. It is used to iterate over the events in the watched directory.
-#### close
+#### stop
```python
-def close()
+def stop()
```
-Stop watching the directory.
+Stop watching the directory. After you stop the watcher you won't be able to get the events anymore.
-**Warnings**:
- You won't get any event if you don't iterate over the handle before closing it.
+#### get\_new\_events
+
+```python
+def get_new_events() -> List[FilesystemEvent]
+```
+
+Get the latest events that have occurred in the watched directory since the last call, or from the beginning of the watching, up to now.
@@ -635,25 +640,23 @@ Creates a new directory and all directories along the way if needed on the speci
True if the directory was created, False if the directory already exists
-#### watch
+#### watch\_dir
```python
-def watch(path: str,
- user: Username = "user",
- request_timeout: Optional[float] = None,
- timeout: Optional[float] = 60) -> WatchHandle
+def watch_dir(path: str,
+ user: Username = "user",
+ request_timeout: Optional[float] = None) -> WatchHandle
```
-Watches directory for filesystem events. The watch will be closed after the timeout.
+Watches directory for filesystem events.
-To get the events, you need to iterate over the returned WatchHandle.
+To get events, use the `get_new_events` method on the returned handle.
**Arguments**:
- `path`: Path to a directory that will be watched
- `user`: Run the operation as this user
- `request_timeout`: Timeout for the request
-- `timeout`: Timeout for the watch, after which the watch will be closed
**Returns**: