(app_state: &AppState, raw_path: &str)
| 278 | } |
| 279 | |
| 280 | pub async fn path_exists(app_state: &AppState, raw_path: &str) -> Result<bool, String> { |
| 281 | match resolve_desktop_path_target(app_state, raw_path, None).await? { |
| 282 | DesktopPathTarget::Local { resolved_path, .. } => Ok(resolved_path.exists()), |
| 283 | DesktopPathTarget::Remote { |
| 284 | requested_path, |
| 285 | entry, |
| 286 | } => { |
| 287 | let remote_fs = app_state |
| 288 | .get_remote_file_service_async() |
| 289 | .await |
| 290 | .map_err(|e| format!("Remote file service not available: {}", e))?; |
| 291 | remote_fs |
| 292 | .exists(&entry.connection_id, &requested_path) |
| 293 | .await |
| 294 | .map_err(|e| format!("Failed to check remote path: {}", e)) |
| 295 | } |
| 296 | } |
| 297 | } |
| 298 | |
| 299 | pub async fn get_path_metadata( |
| 300 | app_state: &AppState, |
no test coverage detected