MCPcopy Index your code
hub / github.com/enowdev/enowX-Coder / read_file

Method read_file

src-tauri/src/tools/executor.rs:211–219  ·  view source on GitHub ↗
(&self, input: &serde_json::Value)

Source from the content-addressed store, hash-verified

209 }
210
211 async fn read_file(&self, input: &serde_json::Value) -> AppResult<String> {
212 let path_str = input["path"]
213 .as_str()
214 .ok_or_else(|| AppError::Validation("Missing 'path' field".to_string()))?;
215 let safe_path = self.validate_path(path_str)?;
216 tokio::fs::read_to_string(safe_path)
217 .await
218 .map_err(AppError::from)
219 }
220
221 async fn write_file(&self, input: &serde_json::Value) -> AppResult<String> {
222 let path_str = input["path"]

Callers 1

executeMethod · 0.80

Calls 1

validate_pathMethod · 0.80

Tested by

no test coverage detected