MCPcopy
hub / github.com/coder/mux / readFileString

Function readFileString

src/node/utils/runtime/helpers.ts:73–80  ·  view source on GitHub ↗
(
  runtime: Runtime,
  path: string,
  abortSignal?: AbortSignal
)

Source from the content-addressed store, hash-verified

71 * Read file contents as a UTF-8 string
72 */
73export async function readFileString(
74 runtime: Runtime,
75 path: string,
76 abortSignal?: AbortSignal
77): Promise<string> {
78 const stream = runtime.readFile(path, abortSignal);
79 return streamToString(stream);
80}
81
82/**
83 * Write string contents to a file atomically

Callers 15

ensureGitInfoExcludeFunction · 0.90
createRuntimeFileReaderFunction · 0.90
injectFileAtMentionsFunction · 0.90
readOverridesFileMethod · 0.90
createProposePlanToolFunction · 0.90
createFileReadToolFunction · 0.90
executeFileEditOperationFunction · 0.90
createMuxAgentsReadToolFunction · 0.90

Calls 2

streamToStringFunction · 0.90
readFileMethod · 0.65

Tested by

no test coverage detected