parameters: (self, dir_name=None)
docstring: Yields (rules, filenames) for each repository directory with DEPS rules.
  
      This walks the directory tree while staying in the repository. Specify
      |dir_name| to walk just one directory and its children; omit |dir_name| to
      walk the entire repository.
  
      Yields:
        Two-element (rules, filenames) tuples. |rules| is a rules.Rules object
        for a directory, and |filenames| is a list of the absolute local paths
        of all files in that directory.
docstring_summary: Yields (rules, filenames) for each repository directory with DEPS rules.
docstring_tokens: Yields ( rules filenames ) for each repository directory with DEPS rules .
function: def GetAllRulesAndFiles(self, dir_name=None):
      """Yields (rules, filenames) for each repository directory with DEPS rules.
  
      This walks the directory tree while staying in the repository. Specify
      |dir_name| to walk just one directory and its children; omit |dir_name| to
      walk the entire repository.
  
      Yields:
        Two-element (rules, filenames) tuples. |rules| is a rules.Rules object
        for a directory, and |filenames| is a list of the absolute local paths
        of all files in that directory.
      """
      if self.is_git and self._git_source_directories is None:
        self._git_source_directories = _GitSourceDirectories(self.base_directory)
        for repo in self.extra_repos:
          repo_path = os.path.join(self.base_directory, repo)
          self._git_source_directories.update(_GitSourceDirectories(repo_path))
  
      # Collect a list of all files and directories to check.
      files_to_check = []
      if dir_name and not os.path.isabs(dir_name):
        dir_name = os.path.join(self.base_directory, dir_name)
      dirs_to_check = [dir_name or self.base_directory]
      while dirs_to_check:
        current_dir = dirs_to_check.pop()
  
        # Check that this directory is part of the source repository. This
        # prevents us from descending into third-party code or directories
        # generated by the build system.
        if self.is_git:
          if NormalizePath(current_dir) not in self._git_source_directories:
            continue
        elif not os.path.exists(os.path.join(current_dir, '.svn')):
          continue
  
        current_dir_rules = self.GetDirectoryRules(current_dir)
  
        if not current_dir_rules:
          continue  # Handle the 'skip_child_includes' case.
  
        current_dir_contents = sorted(os.listdir(current_dir))
        file_names = []
        sub_dirs = []
        for file_name in current_dir_contents:
          full_name = os.path.join(current_dir, file_name)
          if os.path.isdir(full_name):
            sub_dirs.append(full_name)
          else:
            file_names.append(full_name)
        dirs_to_check.extend(reversed(sub_dirs))
  
        yield (current_dir_rules, file_names)
function_tokens: def GetAllRulesAndFiles ( self , dir_name = None ) : if self . is_git and self . _git_source_directories is None : self . _git_source_directories = _GitSourceDirectories ( self . base_directory ) for repo in self . extra_repos : repo_path = os . path . join ( self . base_directory , repo ) self . _git_source_directories . update ( _GitSourceDirectories ( repo_path ) ) # Collect a list of all files and directories to check. files_to_check = [ ] if dir_name and not os . path . isabs ( dir_name ) : dir_name = os . path . join ( self . base_directory , dir_name ) dirs_to_check = [ dir_name or self . base_directory ] while dirs_to_check : current_dir = dirs_to_check . pop ( ) # Check that this directory is part of the source repository. This # prevents us from descending into third-party code or directories # generated by the build system. if self . is_git : if NormalizePath ( current_dir ) not in self . _git_source_directories : continue elif not os . path . exists ( os . path . join ( current_dir , '.svn' ) ) : continue current_dir_rules = self . GetDirectoryRules ( current_dir ) if not current_dir_rules : continue # Handle the 'skip_child_includes' case. current_dir_contents = sorted ( os . listdir ( current_dir ) ) file_names = [ ] sub_dirs = [ ] for file_name in current_dir_contents : full_name = os . path . join ( current_dir , file_name ) if os . path . isdir ( full_name ) : sub_dirs . append ( full_name ) else : file_names . append ( full_name ) dirs_to_check . extend ( reversed ( sub_dirs ) ) yield ( current_dir_rules , file_names )