(Object path2)
| 643 | } |
| 644 | |
| 645 | public static Object ioDirRead(Object path2) { |
| 646 | if (!(path2 instanceof String)) { |
| 647 | return null; |
| 648 | } |
| 649 | |
| 650 | String path = (String) path2; |
| 651 | |
| 652 | try (Stream<Path> stream = Files.list(Path.of(path))) { |
| 653 | List<String> fileNameOnly = new ArrayList<>(); |
| 654 | |
| 655 | stream |
| 656 | .filter(Files::isRegularFile) |
| 657 | .forEach(p -> fileNameOnly.add(p.getFileName().toString())); |
| 658 | |
| 659 | return fileNameOnly; |
| 660 | } catch (Exception e) { |
| 661 | return null; |
| 662 | } |
| 663 | } |
| 664 | |
| 665 | public static Exchange initExchange(Object exchangeId, Object exchangeArgs, boolean isWs) { |
| 666 | if (!(exchangeId instanceof String)) { |
no test coverage detected