Skip to main content

start_watcher

Function start_watcher 

Source
pub fn start_watcher(
    project_root: &Path,
    extensions: &[String],
    dirty_files: DirtyFiles,
    diagnostic_store: Option<Arc<DiagnosticStore>>,
) -> Result<Debouncer<RecommendedWatcher, FileIdMap>>
Expand description

Start watching the project root for file changes.

Returns the debouncer handle (must be kept alive). Dropping it stops the watcher.

§Errors

Returns an error if the watcher can’t be created or the project root can’t be watched.