mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
fix(tauri.js) writeFile and writeBinaryFile API (#857)
This commit is contained in:
committed by
GitHub
parent
da99f632f0
commit
cbd14c3077
5
.changes/fix-fs-api.md
Normal file
5
.changes/fix-fs-api.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri.js": patch
|
||||
---
|
||||
|
||||
Fixes the `writeFile` and `writeBinaryFile` usage.
|
||||
@@ -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
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user