MCPcopy Create free account
hub / github.com/Louisym/MiniCC / normalize_path

Function normalize_path

rust/crates/runtime/src/file_ops.rs:448–455  ·  view source on GitHub ↗
(path: &str)

Source from the content-addressed store, hash-verified

446}
447
448fn normalize_path(path: &str) -> io::Result<PathBuf> {
449 let candidate = if Path::new(path).is_absolute() {
450 PathBuf::from(path)
451 } else {
452 std::env::current_dir()?.join(path)
453 };
454 candidate.canonicalize()
455}
456
457fn normalize_path_allow_missing(path: &str) -> io::Result<PathBuf> {
458 let candidate = if Path::new(path).is_absolute() {

Callers 2

read_fileFunction · 0.85
edit_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected