MCPcopy
hub / github.com/unicity-sphere/sphere-sdk / loadFromExternal

Method loadFromExternal

impl/nodejs/oracle/index.ts:46–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44 }
45
46 protected async loadFromExternal(): Promise<unknown | null> {
47 if (!this.filePath) return null;
48
49 try {
50 if (fs.existsSync(this.filePath)) {
51 const content = fs.readFileSync(this.filePath, 'utf-8');
52 return JSON.parse(content);
53 }
54 } catch {
55 // Fall through to embedded
56 }
57 return null;
58 }
59}
60
61/**

Callers 1

loadFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected