You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rust version (if building from source): rustc --version: 1.7.6
Notify version (or commit hash if building from git): main branch, or 6.1.1 published
If you're coming from a project that makes use of Notify, what it is, and a link to the downstream issue if there is one:
Filesystem type and options:
On Linux: Kernel version:
On Windows: version and if you're running under Windows, Cygwin (unsupported), Linux Subsystem:
If you're running as a privileged user (root, System):
If you're running in a container, details on the runtime and overlay:
If you're running in a VM, details on the hypervisor:
What you did (as detailed as you can)
I'm trying to observing file event around file changes, one thing I noticed is if the change is clearing file to make it empty, I receive Metadata event without Data(Change). Below's a steps I tried
Create a file under under ${some_path}, with random contents. Used filename : error.js
'use client'
export default function Error() {}
Run cargo run --example monitor_debounced ${some_path} to run repo's example
While watcher is running, open file via editor (vscode)
code ${some_path}/error.js
ctrl-a, del to clear contents of the file, then ctrl-s
As long as file contains any characters, watcher emits Modify(Data(Content)) alongside other event so it can be an indication to know file has been modified.
What you expected
Is this expected behavior that empty file won't trigger data event?
If so, is there a recommended way to detect it as modified other then rely on metadata::any event?
What happened
Only metadata event is being emitted if file becomes empty.
The text was updated successfully, but these errors were encountered:
System details
rustc --version
: 1.7.6main
branch, or 6.1.1 publishedWhat you did (as detailed as you can)
I'm trying to observing file event around file changes, one thing I noticed is if the change is clearing file to make it empty, I receive Metadata event without Data(Change). Below's a steps I tried
${some_path}
, with random contents. Used filename :error.js
cargo run --example monitor_debounced ${some_path}
to run repo's examplevscode
)As long as file contains any characters, watcher emits
Modify(Data(Content))
alongside other event so it can be an indication to know file has been modified.What you expected
modified
other then rely on metadata::any event?What happened
Only metadata event is being emitted if file becomes empty.
The text was updated successfully, but these errors were encountered: