62,634
社区成员




try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir, "ab*")) {
for (Path entry: stream) {
System.out.println(entry);
}
} catch (DirectoryIteratorException ex) {
// I/O error encounted during the iteration, the cause is an IOException
throw ex.getCause();
}