fix(tauri.js) writeFile and writeBinaryFile API (#857)

This commit is contained in:
Lucas Fernandes Nogueira
2020-07-19 09:57:40 -03:00
committed by GitHub
parent da99f632f0
commit cbd14c3077
2 changed files with 7 additions and 2 deletions

5
.changes/fix-fs-api.md Normal file
View File

@@ -0,0 +1,5 @@
---
"tauri.js": patch
---
Fixes the `writeFile` and `writeBinaryFile` usage.

View File

@@ -96,7 +96,7 @@ async function writeFile(file: FsTextFileOption, options: FsOptions = {}): Promi
return await promisified({
cmd: 'writeFile',
file: file.path,
path: file.path,
contents: file.contents,
options
})
@@ -155,7 +155,7 @@ async function writeBinaryFile(file: FsBinaryFileOption, options: FsOptions = {}
return await promisified({
cmd: 'writeFile',
file: file.path,
path: file.path,
contents: arrayBufferToBase64(file.contents),
options
})