MCPcopy Create free account
hub / github.com/MiniMax-AI/OpenRoom / readFile

Function readFile

apps/webuiapps/src/lib/localFileApi.ts:68–80  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

66 };
67
68 const readFile = async (path: string): Promise<ReadFileResult> => {
69 const normalizedPath = normalizePath(path);
70 const node = findNodeByPath(normalizedPath);
71
72 if (!node) {
73 throw new Error(`File not found: ${path}`);
74 }
75
76 return {
77 content: node.content,
78 metadata: node.metadata || {},
79 };
80 };
81
82 const writeFile = async (
83 path: string,

Callers

nothing calls this directly

Calls 2

normalizePathFunction · 0.90
findNodeByPathFunction · 0.85

Tested by

no test coverage detected