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