< prev index next >

src/java.base/share/classes/java/nio/file/DirectoryStream.java

Print this page

        

*** 101,111 **** * try (DirectoryStream&lt;Path&gt; stream = Files.newDirectoryStream(dir, "*.{c,h,cpp,hpp,java}")) { * for (Path entry: stream) { * result.add(entry); * } * } catch (DirectoryIteratorException ex) { ! * // I/O error encounted during the iteration, the cause is an IOException * throw ex.getCause(); * } * return result; * } * </pre> --- 101,111 ---- * try (DirectoryStream&lt;Path&gt; stream = Files.newDirectoryStream(dir, "*.{c,h,cpp,hpp,java}")) { * for (Path entry: stream) { * result.add(entry); * } * } catch (DirectoryIteratorException ex) { ! * // I/O error encountered during the iteration, the cause is an IOException * throw ex.getCause(); * } * return result; * } * </pre>
< prev index next >