MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / should_descend

Function should_descend

crates/opencode-tui/src/file_index.rs:105–129  ·  view source on GitHub ↗
(entry: &DirEntry)

Source from the content-addressed store, hash-verified

103}
104
105fn should_descend(entry: &DirEntry) -> bool {
106 if !entry.file_type().is_dir() {
107 return true;
108 }
109 let name = entry.file_name().to_string_lossy();
110 if entry.depth() == 0 {
111 return true;
112 }
113 !matches!(
114 name.as_ref(),
115 ".git"
116 | ".jj"
117 | ".svn"
118 | "node_modules"
119 | "target"
120 | "dist"
121 | "build"
122 | ".next"
123 | ".nuxt"
124 | ".turbo"
125 | ".cache"
126 | ".idea"
127 | ".vscode"
128 )
129}
130
131#[cfg(test)]
132mod tests {

Callers

nothing calls this directly

Calls 1

is_dirMethod · 0.80

Tested by

no test coverage detected