MCPcopy Index your code
hub / github.com/ccxt/ccxt / ioDirRead

Method ioDirRead

java/tests/src/main/java/tests/BaseTest.java:645–663  ·  view source on GitHub ↗
(Object path2)

Source from the content-addressed store, hash-verified

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)) {

Callers 1

loadStaticDataMethod · 0.80

Calls 4

forEachMethod · 0.45
filterMethod · 0.45
addMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected