MCPcopy Create free account
hub / github.com/CodeBendKit/codeseek / _scan_directory_recursive

Method _scan_directory_recursive

rust-core/src/codegraph/parser.rs:46–63  ·  view source on GitHub ↗
(&self, dir: &Path, files: &mut Vec<PathBuf>)

Source from the content-addressed store, hash-verified

44 }
45
46 fn _scan_directory_recursive(&self, dir: &Path, files: &mut Vec<PathBuf>) {
47 if let Ok(entries) = fs::read_dir(dir) {
48 for entry in entries.flatten() {
49 let path = entry.path();
50 if path.is_dir() {
51 // 跳过常见的忽略目录
52 if let Some(name) = path.file_name().and_then(|n| n.to_str()) {
53 if name.starts_with('.') || name == "target" || name == "node_modules" || name == "__pycache__" {
54 continue;
55 }
56 }
57 self._scan_directory_recursive(&path, files);
58 } else if self.is_supported_file(&path) {
59 files.push(path);
60 }
61 }
62 }
63 }
64
65 /// 判断文件是否为支持的源代码文件
66 fn is_supported_file(&self, path: &Path) -> bool {

Callers 1

scan_directoryMethod · 0.80

Calls 1

is_supported_fileMethod · 0.80

Tested by

no test coverage detected