chore(fs-watch) Update Usage (#451)

This commit is contained in:
NaokiM03
2023-06-22 18:29:08 +09:00
committed by GitHub
parent 7b9d7a1d88
commit a305ad3ddb
+2 -2
View File
@@ -57,7 +57,7 @@ import { watch, watchImmediate } from "tauri-plugin-fs-watch-api";
const stopWatching = await watch(
"/path/to/something",
(event) => {
const { type, payload } = event;
const { kind, path } = event;
},
{ recursive: true }
);
@@ -65,7 +65,7 @@ const stopWatching = await watch(
const stopRawWatcher = await watchImmediate(
["/path/a", "/path/b"],
(event) => {
const { path, operation, cookie } = event;
const { type, paths, attrs } = event;
},
{}
);