String[] (Path dir) { try (DirectoryStream<Path> dirStream = Files.newDirectoryStream(dir)) { return StreamEx.of(dirStream.iterator()).map(it -> it.getFileName().toString()).toArray(String[]::new); } catch (AccessDeniedException | NoSuchFileException e) { LOG.debug(e); } catch (IOException | RuntimeException e) { LOG.warn(e); } return null; }