code: def next(self, dryrun=False):
          
  
          # call the start hook
          self.on_start(dryrun)
  
          # store current dir
          curr_dir = ""
  
          # iterate over sources
          for src in self.__sources:
  
              # call the start_source hook
              self.on_start_source(src, dryrun)
  
              # iterate over files
              for filename in src.next():
  
                  # make sure file pass filters
                  if not self.match_filters(filename):
                      continue
  
                  # get curr dir to call the directory-enter hook
                  new_curr_dir = os.path.dirname(filename)
                  if new_curr_dir != curr_dir:
                      self.on_enter_dir(new_curr_dir, dryrun)
                      curr_dir = new_curr_dir
  
                  # process file
                  curr = self.process_file(filename, dryrun)
  
                  # if after process we still want to return file for external iteration, return it
                  if curr is not None:
                      yield curr
  
              # call the end-source hook
              self.on_end_source(src, dryrun)
  
          # call the end iteration hook and raise stop iteration exception
          self.on_end(dryrun)
          raise StopIteration
docs: Iterate over files in all sources.
          Use this if you want to iterate files externally.
  
          :param dryrun: if true, will only return all filenames instead of processing them, eg will not
                          call "process_file" at all, and just show all the files it will scan.