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

Function electronUserDataReadFileSync

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

Source from the content-addressed store, hash-verified

740 * Read a file from Electron userData directory
741 */
742export function electronUserDataReadFileSync(
743 relativePath: string,
744 encoding: BufferEncoding = 'utf-8'
745): string {
746 if (!electronUserDataPath) {
747 throw new Error('[SystemPaths] Electron userData path not initialized');
748 }
749 const fullPath = path.join(electronUserDataPath, relativePath);
750 return fsSync.readFileSync(fullPath, encoding);
751}
752
753/**
754 * Write a file to Electron userData directory

Callers 2

ensureApiKeyFunction · 0.90
loadWindowBoundsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected