Support specifying file encoding

This commit is contained in:
Björn Dalfors
2024-05-29 10:01:32 +02:00
parent 9d09ab2165
commit bd6a1a0d2d
4 changed files with 23 additions and 16 deletions

View File

@@ -55,6 +55,10 @@ export const getAppVersion: RpcEvent<void, string> = {
topic: 'getAppVersion',
}
export const writeFile: RpcEvent<{ filePath: string, data: string }, void> = {
export const writeToFile: RpcEvent<{ filePath: string, data: string, encoding?: string }, void> = {
topic: 'writeFile',
}
export const readFromFile: RpcEvent<{ filePath: string, encoding?: string }, Buffer> = {
topic: 'readFromFile',
}