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

Method _extract_namespace

rust-core/src/codegraph/parser.rs:394–400  ·  view source on GitHub ↗

提取命名空间

(&self, file_path: &Path)

Source from the content-addressed store, hash-verified

392
393 /// 提取命名空间
394 fn _extract_namespace(&self, file_path: &Path) -> String {
395 // 从文件内容解析命名空间
396 if let Ok(content) = fs::read_to_string(file_path) {
397 return self._extract_namespace_from_content(&content, &file_path.to_path_buf());
398 }
399 "global".to_string()
400 }
401
402 /// 解析单个文件(完整实现,支持多语言)
403 pub fn parse_file(&mut self, file_path: &PathBuf) -> Result<(), String> {

Callers 1

Calls 2

to_stringMethod · 0.80

Tested by

no test coverage detected