(Object path2)
| 614 | } |
| 615 | |
| 616 | public static Object ioFileRead(Object path2) { |
| 617 | if (!(path2 instanceof String)) { |
| 618 | return null; |
| 619 | } |
| 620 | |
| 621 | String path = (String) path2; |
| 622 | |
| 623 | try { |
| 624 | String text = Files.readString(Path.of(path), StandardCharsets.UTF_8); |
| 625 | return JsonHelper.deserialize(text); |
| 626 | } catch (Exception e) { |
| 627 | return null; |
| 628 | } |
| 629 | } |
| 630 | |
| 631 | public static boolean ioFileExists(Object path2) { |
| 632 | if (!(path2 instanceof String)) { |
no test coverage detected