Trait PathsMut

trait PathsMut

Providing methods for adding and removing paths to watch.

Box<dyn PathsMut> is created by Watcher::paths_mut. See its documentation for more.

Required Methods

fn add(self: &mut Self, path: &Path, recursive_mode: RecursiveMode) -> Result<()>

Add a new path to watch. See Watcher::watch for more.

fn remove(self: &mut Self, path: &Path) -> Result<()>

Remove a path from watching. See Watcher::unwatch for more.

fn commit(self: Box<Self>) -> Result<()>

Ensure added/removed paths are applied.

The behaviour of dropping a PathsMut without calling commit is unspecified. The implementation is free to ignore the changes or not, and may leave the watcher in a started or stopped state.