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

Function toTextFile

apps/webuiapps/src/lib/fileApi.ts:69–76  ·  view source on GitHub ↗
(fullPath: string, content?: string)

Source from the content-addressed store, hash-verified

67 * "/state.json" → { path: "", name: "state.json" }
68 */
69const toTextFile = (fullPath: string, content?: string): TextFile => {
70 const normalized = normalizePath(fullPath);
71 return {
72 path: getDirPath(normalized),
73 name: getFileName(normalized),
74 ...(content !== undefined ? { content } : {}),
75 };
76};
77
78/** Format timestamp as HH:mm:ss.SSS */
79const ts = () => {

Callers 2

writeFileFunction · 0.85
putTextFilesFunction · 0.85

Calls 3

normalizePathFunction · 0.90
getDirPathFunction · 0.90
getFileNameFunction · 0.90

Tested by

no test coverage detected