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

Method write_text

core/tests/test_workspace_backend.rs:50–60  ·  view source on GitHub ↗
(
        &self,
        path: &WorkspacePath,
        content: &str,
    )

Source from the content-addressed store, hash-verified

48 }
49
50 async fn write_text(
51 &self,
52 path: &WorkspacePath,
53 content: &str,
54 ) -> WorkspaceResult<WorkspaceWriteOutcome> {
55 self.insert(path.as_str(), content);
56 Ok(WorkspaceWriteOutcome {
57 bytes: content.len(),
58 lines: content.lines().count(),
59 })
60 }
61
62 async fn list_dir(&self, path: &WorkspacePath) -> WorkspaceResult<Vec<WorkspaceDirEntry>> {
63 let prefix = if path.is_root() {

Callers

nothing calls this directly

Calls 3

insertMethod · 0.45
as_strMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected