@tauri-apps/plugin-fs 2.6.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-js/index.cjs +3 -1
- package/dist-js/index.js +3 -1
- package/package.json +1 -1
package/dist-js/index.cjs
CHANGED
|
@@ -734,7 +734,9 @@ async function writeFile(path, data, options) {
|
|
|
734
734
|
read: false,
|
|
735
735
|
create: true,
|
|
736
736
|
write: true,
|
|
737
|
-
...options
|
|
737
|
+
...options,
|
|
738
|
+
// overwrite the previous contents, like when writing a buffer
|
|
739
|
+
truncate: !options?.append
|
|
738
740
|
});
|
|
739
741
|
const reader = data.getReader();
|
|
740
742
|
try {
|
package/dist-js/index.js
CHANGED
|
@@ -732,7 +732,9 @@ async function writeFile(path, data, options) {
|
|
|
732
732
|
read: false,
|
|
733
733
|
create: true,
|
|
734
734
|
write: true,
|
|
735
|
-
...options
|
|
735
|
+
...options,
|
|
736
|
+
// overwrite the previous contents, like when writing a buffer
|
|
737
|
+
truncate: !options?.append
|
|
736
738
|
});
|
|
737
739
|
const reader = data.getReader();
|
|
738
740
|
try {
|