(&self, path: &str)
| 117 | } |
| 118 | |
| 119 | pub async fn remove(&self, path: &str) -> Result<(), String> { |
| 120 | #[cfg(not(target_arch = "wasm32"))] |
| 121 | { |
| 122 | let full_path = self.resolve_path(path)?; |
| 123 | std::fs::remove_file(full_path).map_err(|e| e.to_string())?; |
| 124 | Ok(()) |
| 125 | } |
| 126 | |
| 127 | #[cfg(target_arch = "wasm32")] |
| 128 | { |
| 129 | let normalized_path = normalize_relative_path(path, "storage remove path")?; |
| 130 | let op_id = unsafe { |
| 131 | ply_storage_remove(self.root_id, JsObject::string(&normalized_path)) |
| 132 | }; |
| 133 | let result = wait_for_response(op_id).await?; |
| 134 | ensure_success(&result) |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | pub async fn export(&self, path: &str) -> Result<(), String> { |
| 139 | #[cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))] |
no test coverage detected