@tauri-apps/plugin-fs 2.0.0-alpha.5 → 2.0.0-alpha.6

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
@@ -639,8 +639,8 @@ async function exists(path, options) {
639
639
  options,
640
640
  });
641
641
  }
642
- async function unwatch(id) {
643
- await core.invoke("plugin:fs|unwatch", { id });
642
+ async function unwatch(rid) {
643
+ await core.invoke("plugin:fs|unwatch", { rid });
644
644
  }
645
645
  /**
646
646
  * Watch changes (after a delay) on files or directories.
@@ -666,6 +666,8 @@ interface WriteFileOptions {
666
666
  append?: boolean;
667
667
  /** Sets the option to allow creating a new file, if one doesn't already exist at the specified path (defaults to `true`). */
668
668
  create?: boolean;
669
+ /** Sets the option to create a new file, failing if it already exists. */
670
+ createNew?: boolean;
669
671
  /** File permissions. Ignored on Windows. */
670
672
  mode?: number;
671
673
  /** Base directory for `path` */
@@ -756,12 +758,12 @@ type RawEventKind = "any " | {
756
758
  * @since 2.0.0
757
759
  */
758
760
  type DebouncedEvent = {
759
- kind: "any";
761
+ kind: "Any";
760
762
  path: string;
761
- } | {
762
- kind: "AnyContinous";
763
+ }[] | {
764
+ kind: "AnyContinuous";
763
765
  path: string;
764
- };
766
+ }[];
765
767
  /**
766
768
  * @since 2.0.0
767
769
  */
package/dist-js/index.js CHANGED
@@ -637,8 +637,8 @@ async function exists(path, options) {
637
637
  options,
638
638
  });
639
639
  }
640
- async function unwatch(id) {
641
- await invoke("plugin:fs|unwatch", { id });
640
+ async function unwatch(rid) {
641
+ await invoke("plugin:fs|unwatch", { rid });
642
642
  }
643
643
  /**
644
644
  * Watch changes (after a delay) on files or directories.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tauri-apps/plugin-fs",
3
- "version": "2.0.0-alpha.5",
3
+ "version": "2.0.0-alpha.6",
4
4
  "description": "Access the file system.",
5
5
  "license": "MIT or APACHE-2.0",
6
6
  "authors": [