MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / with_file_time_read

Method with_file_time_read

crates/opencode-tool/src/tool.rs:497–506  ·  view source on GitHub ↗
(mut self, callback: F)

Source from the content-addressed store, hash-verified

495 }
496
497 pub fn with_file_time_read<F, Fut>(mut self, callback: F) -> Self
498 where
499 F: Fn(String, String) -> Fut + Send + Sync + 'static,
500 Fut: std::future::Future<Output = Result<(), ToolError>> + Send + 'static,
501 {
502 self.file_time_read = Some(Arc::new(move |session_id, file_path| {
503 Box::pin(callback(session_id, file_path))
504 }));
505 self
506 }
507
508 pub async fn do_file_time_read(&self, file_path: String) -> Result<(), ToolError> {
509 if let Some(ref callback) = self.file_time_read {

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected