aionotify/base.py
def watch(self, path, flags, *, alias=None):
        """Add a new watching rule."""
        if alias is None:
            alias = path
        if alias in self.requests:
            raise ValueError("A watch request is already scheduled for alias %s" % alias)
        self.requests[alias] = (path, flags)
        if self._fd is not None:
            # We've started, register the watch immediately.
            self._setup_watch(alias, path, flags)
def watch(self, path, flags, *, alias=None):
        if alias is None:
            alias = path
        if alias in self.requests:
            raise ValueError("A watch request is already scheduled for alias %s" % alias)
        self.requests[alias] = (path, flags)
        if self._fd is not None:
            # We've started, register the watch immediately.
            self._setup_watch(alias, path, flags)
def watch ( self , path , flags , * , alias = None ) : if alias is None : alias = path if alias in self . requests : raise ValueError ( "A watch request is already scheduled for alias %s" % alias ) self . requests [ alias ] = ( path , flags ) if self . _fd is not None : # We've started, register the watch immediately. self . _setup_watch ( alias , path , flags )
Add a new watching rule.
Add a new watching rule .