MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / is_file

Method is_file

crates/opencode-util/src/filesystem.rs:19–24  ·  view source on GitHub ↗
(p: P)

Source from the content-addressed store, hash-verified

17 }
18
19 pub async fn is_file<P: AsRef<Path>>(p: P) -> bool {
20 match fs::metadata(p).await {
21 Ok(m) => m.is_file(),
22 Err(_) => false,
23 }
24 }
25
26 #[cfg(windows)]
27 pub fn normalize_path(p: &str) -> std::io::Result<String> {

Callers 15

list_filesFunction · 0.80
read_fileFunction · 0.80
search_recursiveFunction · 0.80
search_with_limitMethod · 0.80
filesMethod · 0.80
glob_upMethod · 0.80
expand_globFunction · 0.80
resolve_config_pathMethod · 0.80
refreshMethod · 0.80
executeMethod · 0.80
find_instruction_fileFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected