Skip to content

CreateKind | RemoveKind | ModifyKind seem to always be Any most of the time? #261

@oOBoomberOo

Description

@oOBoomberOo

System details

  • OS/Platform name and version: Windows 10
  • Rust version (if building from source): 1.46.0
  • Notify version (or commit hash if building from git): 5.0.0-pre.3
  • Filesystem type and options: NTFS

What you did (as detailed as you can)

I have a basic file watcher function which watch for any event from some path recursively:

let mut source_watcher = immediate_watcher(move |res| match res {
	Ok(event) => {
		let event: Event = event;
		log::info!("{:#?}", event);
	}
	Err(e) => log::error!("{}", e),
})?;

source_watcher.watch(&path, RecursiveMode::Recursive)?;
// ...

What you expected

The log message will print a helpful message of what exactly happened with the file/folder under that path.

What happened

The log message will almost always print an Any variant of CreateKind, RemoveKind, and ModifyKind. Only when I try renaming some file that it manage to print the ModifyKind::Name variant.

Wouldn't this be quite useless for a more complex situation where you need to know what exactly happened to the file/folder?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions