MCPcopy Create free account
hub / github.com/MatterAIOrg/OrbCode / readText

Function readText

src/memory/loader.ts:30–36  ·  view source on GitHub ↗

Read a file as UTF-8, returning undefined if it's missing or unreadable.

(filePath: string)

Source from the content-addressed store, hash-verified

28
29/** Read a file as UTF-8, returning undefined if it's missing or unreadable. */
30function readText(filePath: string): string | undefined {
31 try {
32 return fs.readFileSync(filePath, "utf8")
33 } catch {
34 return undefined
35 }
36}
37
38/** Resolve an @include path relative to the including file's directory. */
39function resolveInclude(ref: string, baseDir: string): string {

Callers 1

loadWithIncludesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected