code: def update_files(self):
          if self._update_time and int(time.time()) - self._update_time < self._discover_interval:
              return
          self._update_time = int(time.time())
          possible_files = []
          files = []
          if len(self._beaver_config.get('globs')) > 0:
              extend_files = files.extend
              for name, exclude in self._beaver_config.get('globs').items():
                  globbed = [os.path.realpath(filename) for filename in eglob(name, exclude)]
                  extend_files(globbed)
                  self._beaver_config.addglob(name, globbed)
                  self._callback(("addglob", (name, globbed)))
          else:
              append_files = files.append
              for name in self.listdir():
                  append_files(os.path.realpath(os.path.join(self._folder, name)))
          for absname in files:
              try:
                  st = os.stat(absname)
              except EnvironmentError, err:
                  if err.errno != errno.ENOENT:
                      raise
              else:
                  if not stat.S_ISREG(st.st_mode):
                      continue
                  append_possible_files = possible_files.append
                  fid = self.get_file_id(st)
                  append_possible_files((fid, absname))
          new_files = [fname for fid, fname in possible_files if fid not in self._tails]
          self.watch(new_files)