MCPcopy Index your code
hub / github.com/AI45Lab/Code / read_text

Method read_text

core/src/agent_api/tests.rs:76–88  ·  view source on GitHub ↗
(
        &self,
        path: &crate::workspace::WorkspacePath,
    )

Source from the content-addressed store, hash-verified

74#[async_trait::async_trait]
75impl crate::workspace::WorkspaceFileSystem for TestWorkspaceFs {
76 async fn read_text(
77 &self,
78 path: &crate::workspace::WorkspacePath,
79 ) -> crate::workspace::WorkspaceResult<String> {
80 self.files
81 .read()
82 .unwrap()
83 .get(path.as_str())
84 .cloned()
85 .ok_or_else(|| crate::workspace::WorkspaceError::NotFound {
86 path: path.as_str().to_string(),
87 })
88 }
89
90 async fn write_text(
91 &self,

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected