pub fn extend(&mut self, paths: Vec<WatchPathBuf>) -> Result<(), notify::Error> {
        for path in paths {
            let recursive_paths = match path {
                WatchPathBuf::Recursive(path) => walk_path_topo(path)?,
                WatchPathBuf::Normal(path) => vec![path],
            };
            for p in recursive_paths {
                let p = p.canonicalize()?;
                match Self::extend_filter(p) {
                    Err(FilteredOut { reason, path }) => {
                        debug!("Skipping watching {}: {}", path.display(), reason)
                    }
                    Ok(p) => {
                        self.add_path(p)?;
                    }
                }
            }
        }
        Ok(())
    }
/// Extend the watch list with an additional list of paths.
/// Note: Watch maintains a list of already watched paths, and
/// will not add duplicates.
Extend the watch list with an additional list of paths.
Note: Watch maintains a list of already watched paths, and
will not add duplicates.
Extend the watch list with an additional list of paths . Note : Watch maintains a list of already watched paths and will not add duplicates .
pub fn extend(&mut self, paths: Vec<WatchPathBuf>) -> Result<(), notify::Error> {
        for path in paths {
            let recursive_paths = match path {
                WatchPathBuf::Recursive(path) => walk_path_topo(path)?,
                WatchPathBuf::Normal(path) => vec![path],
            };
            for p in recursive_paths {
                let p = p.canonicalize()?;
                match Self::extend_filter(p) {
                    Err(FilteredOut { reason, path }) => {
                        debug!("Skipping watching {}: {}", path.display(), reason)
                    }
                    Ok(p) => {
                        self.add_path(p)?;
                    }
                }
            }
        }
        Ok(())
    }
pub fn extend ( & mut self , paths : Vec < WatchPathBuf > ) -> Result < ( ) , notify :: Error > { for path in paths { let recursive_paths = match path { WatchPathBuf :: Recursive ( path ) => walk_path_topo ( path ) ? , WatchPathBuf :: Normal ( path ) => vec ! [ path ] , } ; for p in recursive_paths { let p = p . canonicalize ( ) ? ; match Self :: extend_filter ( p ) { Err ( FilteredOut { reason , path } ) => { debug ! ( " " path display ( ) reason ) } Ok ( p ) => { self . add_path ( p ) ? ; } } } } Ok ( ( ) ) }
Extend the watch list with an additional list of paths.
Extend the watch list with an additional list of paths .
&mut self
paths
Vec<WatchPathBuf>
&mut self
paths
Vec<WatchPathBuf>