( relativePath: string, encoding: BufferEncoding = 'utf-8' )
| 740 | * Read a file from Electron userData directory |
| 741 | */ |
| 742 | export 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 |
no outgoing calls
no test coverage detected