Opens the file externally. @throws IOException I/O exception
()
| 369 | * @throws IOException I/O exception |
| 370 | */ |
| 371 | public void open() throws IOException { |
| 372 | final String[] args; |
| 373 | if(Prop.WIN) { |
| 374 | args = new String[] { "rundll32", "url.dll,FileProtocolHandler", pth }; |
| 375 | } else if(Prop.MAC) { |
| 376 | args = new String[] { "/usr/bin/open", pth }; |
| 377 | } else { |
| 378 | args = new String[] { "xdg-open", pth }; |
| 379 | } |
| 380 | new ProcessBuilder(args).directory(parent().file).start(); |
| 381 | } |
| 382 | |
| 383 | /** |
| 384 | * Returns a native file path representation. If normalization fails, returns the original path. |
no test coverage detected