@tauri-apps/plugin-fs 3.0.0-alpha.2 → 3.0.0-alpha.3

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 CHANGED
@@ -727,7 +727,9 @@ async function writeFile(path, data, options) {
727
727
  read: false,
728
728
  create: true,
729
729
  write: true,
730
- ...options
730
+ ...options,
731
+ // overwrite the previous contents, like when writing a buffer
732
+ truncate: !options?.append
731
733
  });
732
734
  const reader = data.getReader();
733
735
  try {
package/dist-js/index.js CHANGED
@@ -725,7 +725,9 @@ async function writeFile(path, data, options) {
725
725
  read: false,
726
726
  create: true,
727
727
  write: true,
728
- ...options
728
+ ...options,
729
+ // overwrite the previous contents, like when writing a buffer
730
+ truncate: !options?.append
729
731
  });
730
732
  const reader = data.getReader();
731
733
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tauri-apps/plugin-fs",
3
- "version": "3.0.0-alpha.2",
3
+ "version": "3.0.0-alpha.3",
4
4
  "description": "Access the file system.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "authors": [
@@ -25,6 +25,6 @@
25
25
  "LICENSE"
26
26
  ],
27
27
  "dependencies": {
28
- "@tauri-apps/api": "^3.0.0-alpha.1"
28
+ "@tauri-apps/api": "^3.0.0-alpha.2"
29
29
  }
30
30
  }