MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / readOptionalFile

Function readOptionalFile

packages/node-sdk/test/local-logging.test.ts:41–47  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

39}
40
41async function readOptionalFile(path: string): Promise<string> {
42 try {
43 return await readFile(path, 'utf-8');
44 } catch {
45 return '';
46 }
47}
48
49function snapshotLogEnv(): Record<(typeof LOG_ENV_KEYS)[number], string | undefined> {
50 return Object.fromEntries(LOG_ENV_KEYS.map((key) => [key, process.env[key]])) as Record<

Callers 1

Calls 1

readFileFunction · 0.50

Tested by

no test coverage detected