@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 +2 -2
- package/dist-js/index.d.ts +6 -4
- package/dist-js/index.js +2 -2
- package/package.json +1 -1
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(
|
|
643
|
-
await core.invoke("plugin:fs|unwatch", {
|
|
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.
|
package/dist-js/index.d.ts
CHANGED
|
@@ -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: "
|
|
761
|
+
kind: "Any";
|
|
760
762
|
path: string;
|
|
761
|
-
} | {
|
|
762
|
-
kind: "
|
|
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(
|
|
641
|
-
await invoke("plugin:fs|unwatch", {
|
|
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.
|