MCPcopy Create free account
hub / github.com/AI45Lab/Code / has_windows_path_prefix

Function has_windows_path_prefix

core/src/workspace/mod.rs:920–927  ·  view source on GitHub ↗
(input: &str)

Source from the content-addressed store, hash-verified

918}
919
920fn has_windows_path_prefix(input: &str) -> bool {
921 let bytes = input.as_bytes();
922 if bytes.len() >= 2 && bytes[0].is_ascii_alphabetic() && bytes[1] == b':' {
923 return true;
924 }
925
926 input.starts_with("\\\\") || input.starts_with("//")
927}
928
929pub(crate) fn validate_relative_pattern(pattern: &str, label: &str) -> Result<()> {
930 let pattern = pattern.trim();

Callers 3

normalize_virtual_pathFunction · 0.85
normalize_local_pathFunction · 0.85

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected