pull/334/head
FabianLars 2 years ago
parent e606adf992
commit 08ad3801b8
No known key found for this signature in database
GPG Key ID: 3B12BC1DEBF61125

@ -56,18 +56,18 @@ import { watch, watchImmediate } from "tauri-plugin-fs-watch-api";
// can also watch an array of paths // can also watch an array of paths
const stopWatching = await watch( const stopWatching = await watch(
"/path/to/something", "/path/to/something",
{ recursive: true },
(event) => { (event) => {
const { type, payload } = event; const { type, payload } = event;
} },
{ recursive: true }
); );
const stopRawWatcher = await watchImmediate( const stopRawWatcher = await watchImmediate(
["/path/a", "/path/b"], ["/path/a", "/path/b"],
{},
(event) => { (event) => {
const { path, operation, cookie } = event; const { path, operation, cookie } = event;
} },
{}
); );
``` ```

Loading…
Cancel
Save