我们可以将文件从沙箱内下载到本地。

import fs from 'fs'
import { Sandbox } from '@e2b/code-interpreter'

const sandbox = await Sandbox.create()

// 从沙箱读取文件内容
const content = await sandbox.files.read('/path/in/sandbox')

// 将文件写入本地文件系统
fs.writeFileSync('/local/path', content)