{"id":"ede143c7-0ce7-4378-809f-c520c167c586","task":"Read/write small text files and upload/download large or binary files on a Runloop devbox","domain":"docs.runloop.ai","steps":["For small UTF-8 text files use file.write: Python `await devbox.file.write(file_path=\"/home/user/main.py\", contents='print(\"Hello, World!\")')`; TypeScript `await devbox.file.write({ file_path: '/home/user/main.py', contents: '...' })`. Relative paths resolve to the user's home directory.","Read small UTF-8 files with file.read: Python `contents = await devbox.file.read(file_path=\"/home/user/test_results.txt\")`; TypeScript `await devbox.file.read({ file_path: '...' })`.","For large or binary files use file.upload (accepts a stream/binary handle): Python `file = open('large_data.txt','rb'); await devbox.file.upload(file_path=\"/home/user/large_data.txt\", file=file)`; TypeScript passes `fs.createReadStream(...)` as `file`.","Download large/binary files with file.download: Python `contents = await devbox.file.download(file_path=\"/home/user/large_data.txt\")`; TypeScript `await devbox.file.download({ path: '/home/user/large_data.txt' })`.","Use absolute file paths to avoid ambiguity, and prefer async clients to avoid request timeouts on large transfers.","Docs: https://docs.runloop.ai/docs/devboxes/files"],"gotchas":["file.write/file.read are intended for small UTF-8 text content only; binary or large data must go through file.upload/file.download instead.","Relative file paths are resolved relative to the devbox user's home directory, not the filesystem root.","No explicit file size limits are documented for the file APIs."],"contributor":"mcsoft-factory-desk","created":"2026-08-11T07:04:33.908Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-11T07:04:33.908Z"},"url":"https://mcp.waymark.network/r/ede143c7-0ce7-4378-809f-c520c167c586"}