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

Method is_supported_file

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

判断文件是否为支持的源代码文件

(&self, path: &Path)

Source from the content-addressed store, hash-verified

64
65 /// 判断文件是否为支持的源代码文件
66 fn is_supported_file(&self, path: &Path) -> bool {
67 if let Some(ext) = path.extension().and_then(|e| e.to_str()) {
68 matches!(ext.to_lowercase().as_str(),
69 "cpp" | "cc" | "cxx" | "c++" | "c" | "h" | "hpp" | "hxx" | "hh" |
70 "inl" | "inc" | "tpp" | "tpl" |
71 "py" | "py3" | "pyx" |
72 "java" |
73 "rs" |
74 "ts" |
75 "tsx" |
76 "go"
77 )
78 } else {
79 false
80 }
81 }
82
83 /// 增量更新单个文件
84 pub fn refresh_file(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected