code: def watch(self, filepath, func=None, delay=None, ignore=None):
          
          if isinstance(func, string_types):
              cmd = func
              func = shell(func)
              func.name = "shell: {}".format(cmd)
  
          self.watcher.watch(filepath, func, delay, ignore=ignore)
docs: Add the given filepath for watcher list.
  
          Once you have intialized a server, watch file changes before
          serve the server::
  
              server.watch('static/*.stylus', 'make static')
              def alert():
                  print('foo')
              server.watch('foo.txt', alert)
              server.serve()
  
          :param filepath: files to be watched, it can be a filepath,
                           a directory, or a glob pattern
          :param func: the function to be called, it can be a string of
                       shell command, or any callable object without
                       parameters
          :param delay: Delay sending the reload message. Use 'forever' to
                        not send it. This is useful to compile sass files to
                        css, but reload on changed css files then only.
          :param ignore: A function return True to ignore a certain pattern of
                         filepath.