Method
write_text
(
&self,
path: &WorkspacePath,
content: &str,
)
Source from the content-addressed store, hash-verified
| 649 | } |
| 650 | |
| 651 | async fn write_text( |
| 652 | &self, |
| 653 | path: &WorkspacePath, |
| 654 | content: &str, |
| 655 | ) -> WorkspaceResult<WorkspaceWriteOutcome> { |
| 656 | self.insert(path.as_str(), content); |
| 657 | Ok(WorkspaceWriteOutcome { |
| 658 | bytes: content.len(), |
| 659 | lines: content.lines().count(), |
| 660 | }) |
| 661 | } |
| 662 | |
| 663 | async fn list_dir(&self, path: &WorkspacePath) -> WorkspaceResult<Vec<WorkspaceDirEntry>> { |
| 664 | let prefix = if path.is_root() { |