(&self, path: &WorkspacePath)
| 81 | #[async_trait] |
| 82 | impl WorkspaceFileSystem for LocalWorkspaceBackend { |
| 83 | async fn read_text(&self, path: &WorkspacePath) -> WorkspaceResult<String> { |
| 84 | let resolved = self.local_path_for_read(path)?; |
| 85 | match tokio::fs::read_to_string(&resolved).await { |
| 86 | Ok(s) => Ok(s), |
| 87 | Err(e) if e.kind() == std::io::ErrorKind::NotFound => Err(WorkspaceError::NotFound { |
| 88 | path: resolved.display().to_string(), |
| 89 | }), |
| 90 | Err(e) => Err(WorkspaceError::Backend(anyhow!( |
| 91 | "Failed to read file {}: {}", |
| 92 | resolved.display(), |
| 93 | e |
| 94 | ))), |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | async fn write_text( |
| 99 | &self, |
no test coverage detected