Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Fix placeholder paths
Tomas Valenta2ab0e993189f
diff --git a/apps/web/src/app/(docs)/docs/guide/beta-migration/page.mdx b/apps/web/src/app/(docs)/docs/guide/beta-migration/page.mdxindex 8076a5030..cc9179017 100644--- a/apps/web/src/app/(docs)/docs/guide/beta-migration/page.mdx+++ b/apps/web/src/app/(docs)/docs/guide/beta-migration/page.mdx@@ -152,12 +152,12 @@ The method accepts `path` in the sandbox as the first argument and the `data` asimport Sandbox from 'e2b'// Before-// const content = fs.readFileSync('local-path')-// await sandbox.uploadFile(content, 'path-in-sandbox')+// const content = fs.readFileSync('/local/path')+// await sandbox.uploadFile(content, '/path/in/sandbox')// Now-const content = fs.readFileSync('local-path')-await sandbox.files.write('path-in-sandbox', content)+const content = fs.readFileSync('/local/path')+await sandbox.files.write('/path/in/sandbox', content)``````pythonfrom e2b import Sandbox@@ -168,7 +168,7 @@ from e2b import Sandbox# Nowwith open("path/to/local/file", "rb") as file:- sandbox.files.write("path-in-sandbox", file)+ sandbox.files.write("/path/in/sandbox", file)```</CodeGroup>@@ -182,19 +182,19 @@ The method accepts `path` in the sandbox as the first argument and optional `forimport Sandbox from 'e2b'// Before-//const content = await sandbox.downloadFile('path-in-sandbox')+//const content = await sandbox.downloadFile('/path/in/sandbox')// Now-const content = await sandbox.files.read('path-in-sandbox')+const content = await sandbox.files.read('/path/in/sandbox')``````pythonfrom e2b import Sandbox# Before-# content = sandbox.download_file('path-in-sandbox')+# content = sandbox.download_file('/path/in/sandbox')# Now-content = sandbox.files.read("path-in-sandbox")+content = sandbox.files.read("/path/in/sandbox")```</CodeGroup>@@ -306,13 +306,13 @@ import Sandbox from 'e2b'// Before// const sandbox = await Sandbox.create()-// const watcher = sandbox.filesystem.watchDir('path-in-sandbox')+// const watcher = sandbox.filesystem.watchDir('/path/in/sandbox')// watcher.addEventListener((event) => console.log(event))// await watcher.start()// Nowconst sandbox = await Sandbox.create()-await sandbox.files.watch('path-in-sandbox', (event) => console.log(event))+await sandbox.files.watch('/path/in/sandbox', (event) => console.log(event))``````pythonfrom e2b import Sandbox@@ -320,13 +320,13 @@ from e2b import Sandbox# Before# sandbox = Sandbox()-# watcher = sandbox.filesystem.watch_dir("path-in-sandbox")+# watcher = sandbox.filesystem.watch_dir("/path/in/sandbox")# watcher.add_event_listener(lambda event: print(event))# watcher.start()# Nowsandbox = Sandbox()-watcher = sandbox.files.watch("path-in-sandbox")+watcher = sandbox.files.watch("/path/in/sandbox")for event in watcher:print(event)@@ -370,7 +370,7 @@ import Sandbox from 'e2b'// const url = await sandbox.fileURL// Now-const url = await sandbox.uploadUrl('path-in-sandbox')+const url = await sandbox.uploadUrl('/path/in/sandbox')``````pythonfrom e2b import Sandbox@@ -379,7 +379,7 @@ from e2b import Sandbox# url = sandbox.file_url()# Now-url = sandbox.upload_url('path-in-sandbox')+url = sandbox.upload_url('/path/in/sandbox')```</CodeGroup>