MCPcopy Create free account
hub / github.com/anomalyco/opencode / readText

Function readText

packages/opencode/src/util/filesystem.ts:40–42  ·  view source on GitHub ↗
(p: string)

Source from the content-addressed store, hash-verified

38}
39
40export async function readText(p: string): Promise<string> {
41 return readFile(p, "utf-8")
42}
43
44export async function readJson<T = unknown>(p: string): Promise<T> {
45 return JSON.parse(await readFile(p, "utf-8"))

Callers 2

writeProposedEditMethod · 0.90
diffContentForPatchFunction · 0.90

Calls 1

readFileFunction · 0.85

Tested by

no test coverage detected