Returns a native file path representation. If normalization fails, returns the original path. @return path
()
| 385 | * @return path |
| 386 | */ |
| 387 | public IOFile normalize() { |
| 388 | try { |
| 389 | final Path path = toPath().toRealPath(); |
| 390 | return new IOFile(path + (Files.isDirectory(path) ? "/" : "")); |
| 391 | } catch(final IOException ex) { |
| 392 | Util.debug(ex); |
| 393 | return this; |
| 394 | } |
| 395 | } |
| 396 | |
| 397 | /** |
| 398 | * Checks if a file is hidden. |