Skip to main content
machine.files manages files inside one machine. /workspace is the default mutable work tree, but general filesystem APIs also accept valid machine-scoped absolute paths such as /tmp/result.txt, /context/input.json, and /srv/app/config.json.

Read and write

Use format="stream" for large downloads:
Migration note: No breaking change: /workspace is still the default mutable work tree. General filesystem APIs also accept valid machine-scoped absolute paths such as /srv/app/...; reserved runtime paths under /workspace/.nullspace are rejected.

Upload and download

Other management helpers include make_dir(), rename(), remove(), set_permissions(), and get_info() as an alias for info().

Replace and watch

Most file helpers accept user= when paths should be resolved for a specific machine user.

Async API

Async file uploads, signed URLs, replace, and watch helpers mirror the synchronous machine.files API. Concept: Exec. API reference: listDir, readFile, writeFile, uploadUrl, and downloadUrl.