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))
  
          # add new ones
          new_files = [fname for fid, fname in possible_files if fid not in self._tails]
          self.watch(new_files)
docs: Ensures all files are properly loaded.
          Detects new files, file removals, file rotation, and truncation.
          On non-linux platforms, it will also manually reload the file for tailing.
          Note that this hack is necessary because EOF is cached on BSD systems.