(path: &str)
| 311 | } |
| 312 | |
| 313 | fn open_file(path: &str) { |
| 314 | #[cfg(target_os = "macos")] |
| 315 | { |
| 316 | let _ = Command::new("open").arg(path).spawn(); |
| 317 | } |
| 318 | #[cfg(target_os = "linux")] |
| 319 | { |
| 320 | let _ = Command::new("xdg-open").arg(path).spawn(); |
| 321 | } |
| 322 | #[cfg(target_os = "windows")] |
| 323 | { |
| 324 | let _ = Command::new("cmd").args(["/c", "start", path]).spawn(); |
| 325 | } |
| 326 | } |