MCPcopy Index your code
hub / github.com/HKUDS/DeepCode / get_all_repo_files

Method get_all_repo_files

tools/code_indexer.py:545–566  ·  view source on GitHub ↗

Recursively get all supported files in a repository

(self, repo_path: Path)

Source from the content-addressed store, hash-verified

543 self.logger.warning(f"Failed to save debug response: {e}")
544
545 def get_all_repo_files(self, repo_path: Path) -> List[Path]:
546 """Recursively get all supported files in a repository"""
547 files = []
548
549 try:
550 for root, dirs, filenames in os.walk(repo_path):
551 # Skip common non-code directories
552 dirs[:] = [
553 d
554 for d in dirs
555 if not d.startswith(".") and d not in self.skip_directories
556 ]
557
558 for filename in filenames:
559 file_path = Path(root) / filename
560 if file_path.suffix.lower() in self.supported_extensions:
561 files.append(file_path)
562
563 except Exception as e:
564 self.logger.error(f"Error traversing {repo_path}: {e}")
565
566 return files
567
568 def generate_file_tree(self, repo_path: Path, max_depth: int = 5) -> str:
569 """Generate file tree structure string for the repository"""

Callers 1

process_repositoryMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected