Reference

Read a file

Read a file from a branch, whole or a range of its bytes.

const work = sky.disk("acme", { branch: "agent-42" });
const text = await work.read("notes.md");
const bytes = await work.read("notes.md", { as: "bytes", offset: 0, length: 5 });