MCPcopy
hub / github.com/AutoMaker-Org/automaker / systemPathReadFile

Function systemPathReadFile

libs/platform/src/system-paths.ts:537–545  ·  view source on GitHub ↗
(
  filePath: string,
  encoding: BufferEncoding = 'utf-8'
)

Source from the content-addressed store, hash-verified

535 * Only use for reading Claude config files and similar system configs.
536 */
537export async function systemPathReadFile(
538 filePath: string,
539 encoding: BufferEncoding = 'utf-8'
540): Promise<string> {
541 if (!isAllowedSystemPath(filePath)) {
542 throw new Error(`[SystemPaths] Access denied: ${filePath} is not an allowed system path`);
543 }
544 return fs.readFile(filePath, encoding);
545}
546
547/**
548 * Read a file from an allowed system path (synchronous)

Callers 4

getClaudeAuthIndicatorsFunction · 0.85
getCodexAuthIndicatorsFunction · 0.85

Calls 2

isAllowedSystemPathFunction · 0.85
readFileMethod · 0.80

Tested by

no test coverage detected