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

Method display_path

core/src/workspace/mod.rs:771–782  ·  view source on GitHub ↗
(&self, path: &WorkspacePath)

Source from the content-addressed store, hash-verified

769 }
770
771 pub fn display_path(&self, path: &WorkspacePath) -> String {
772 if path.is_root() {
773 return self.workspace_ref.display_root.clone();
774 }
775
776 let root = self.workspace_ref.display_root.trim_end_matches('/');
777 if root.is_empty() {
778 path.as_str().to_string()
779 } else {
780 format!("{root}/{}", path.as_str())
781 }
782 }
783}
784
785/// Builder for assembling workspace services without constructor arity churn.

Callers 2

executeMethod · 0.80
executeMethod · 0.80

Calls 4

is_rootMethod · 0.80
cloneMethod · 0.45
is_emptyMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected