MCPcopy Create free account
hub / github.com/GCWing/BitFun / path_exists

Function path_exists

src/apps/desktop/src/api/path_target.rs:280–297  ·  view source on GitHub ↗
(app_state: &AppState, raw_path: &str)

Source from the content-addressed store, hash-verified

278}
279
280pub 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
299pub async fn get_path_metadata(
300 app_state: &AppState,

Callers 1

check_path_existsFunction · 0.85

Calls 3

existsMethod · 0.45

Tested by

no test coverage detected