Write content to a file in the sandbox.
write(
path: string,
content: string | Uint8Array<ArrayBufferLike>,
timeout: number = 60
): Promise<void>| Name | Type | Description |
|---|---|---|
path* | string | Target file path in the sandbox. |
content* | string | Uint8Array<ArrayBufferLike> | File content (string or bytes). |
timeout | number | Default: 60Request timeout in seconds. |
await sandbox.write("/tmp/script.py", 'print("Hello!")');