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

Function electronAppReadFile

libs/platform/src/system-paths.ts:936–948  ·  view source on GitHub ↗
(
  filePath: string,
  callback: (err: NodeJS.ErrnoException | null, data: Buffer | undefined) => void
)

Source from the content-addressed store, hash-verified

934 * Read a file from the Electron app bundle (async with callback for compatibility)
935 */
936export function electronAppReadFile(
937 filePath: string,
938 callback: (err: NodeJS.ErrnoException | null, data: Buffer | undefined) => void
939): void {
940 if (!isElectronAppPath(filePath)) {
941 callback(
942 new Error(`[SystemPaths] Access denied: ${filePath} is not within Electron app bundle`),
943 undefined
944 );
945 return;
946 }
947 fsSync.readFile(filePath, callback);
948}
949
950// =============================================================================
951// High-level Tool Detection Methods

Callers 1

startStaticServerFunction · 0.90

Calls 2

isElectronAppPathFunction · 0.85
readFileMethod · 0.80

Tested by

no test coverage detected