mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-26 21:41:48 +02:00
chore(fs-watch) Update Usage (#451)
This commit is contained in:
@@ -57,7 +57,7 @@ import { watch, watchImmediate } from "tauri-plugin-fs-watch-api";
|
|||||||
const stopWatching = await watch(
|
const stopWatching = await watch(
|
||||||
"/path/to/something",
|
"/path/to/something",
|
||||||
(event) => {
|
(event) => {
|
||||||
const { type, payload } = event;
|
const { kind, path } = event;
|
||||||
},
|
},
|
||||||
{ recursive: true }
|
{ recursive: true }
|
||||||
);
|
);
|
||||||
@@ -65,7 +65,7 @@ const stopWatching = await watch(
|
|||||||
const stopRawWatcher = await watchImmediate(
|
const stopRawWatcher = await watchImmediate(
|
||||||
["/path/a", "/path/b"],
|
["/path/a", "/path/b"],
|
||||||
(event) => {
|
(event) => {
|
||||||
const { path, operation, cookie } = event;
|
const { type, paths, attrs } = event;
|
||||||
},
|
},
|
||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user