Read a file from the sandbox.
read(path: string, timeout: number = 60): Promise<Uint8Array<ArrayBufferLike>>| Name | Type | Description |
|---|---|---|
path* | string | File path to read. |
timeout | number | Default: 60Request timeout in seconds. |
const content = await sandbox.read("/tmp/output.txt");
const text = new TextDecoder().decode(content);
console.log(text);