src/share/classes/java/nio/file/Files.java

Print this page

        

*** 508,518 **** * Suppose we want to iterate over the files in a directory that are * larger than 8K. * <pre> * DirectoryStream.Filter&lt;Path&gt; filter = new DirectoryStream.Filter&lt;Path&gt;() { * public boolean accept(Path file) throws IOException { ! * return (Files.size(file) > 8192L); * } * }; * Path dir = ... * try (DirectoryStream&lt;Path&gt; stream = Files.newDirectoryStream(dir, filter)) { * : --- 508,518 ---- * Suppose we want to iterate over the files in a directory that are * larger than 8K. * <pre> * DirectoryStream.Filter&lt;Path&gt; filter = new DirectoryStream.Filter&lt;Path&gt;() { * public boolean accept(Path file) throws IOException { ! * return (Files.size(file) &gt; 8192L); * } * }; * Path dir = ... * try (DirectoryStream&lt;Path&gt; stream = Files.newDirectoryStream(dir, filter)) { * :
*** 1590,1600 **** * Suppose we want read or set a file's ACL, if supported: * <pre> * Path path = ... * AclFileAttributeView view = Files.getFileAttributeView(path, AclFileAttributeView.class); * if (view != null) { ! * List&lt;AclEntry&gt acl = view.getAcl(); * : * } * </pre> * * --- 1590,1600 ---- * Suppose we want read or set a file's ACL, if supported: * <pre> * Path path = ... * AclFileAttributeView view = Files.getFileAttributeView(path, AclFileAttributeView.class); * if (view != null) { ! * List&lt;AclEntry&gt; acl = view.getAcl(); * : * } * </pre> * *