mirror of
https://github.com/openjdk/jdk.git
synced 2026-07-18 06:59:29 +00:00
6867781: (file) Examples in javadoc use newFileAttributeView instead of getFileAttributeView
Reviewed-by: sherman
This commit is contained in:
parent
90b1aee142
commit
c583b690e3
@ -75,7 +75,7 @@ import java.io.IOException;
|
||||
* .lookupPrincipalByName("joe");
|
||||
*
|
||||
* // get view
|
||||
* AclFileAttributeView view = file.newFileAttributeView(AclFileAttributeView.class);
|
||||
* AclFileAttributeView view = file.getFileAttributeView(AclFileAttributeView.class);
|
||||
*
|
||||
* // create ACE to give "joe" read access
|
||||
* AclEntry entry = AclEntry.newBuilder()
|
||||
|
||||
@ -61,7 +61,7 @@ import java.io.IOException;
|
||||
* Suppose we need to print out the owner and access permissions of a file:
|
||||
* <pre>
|
||||
* FileRef file = ...
|
||||
* PosixFileAttributes attrs = file.newFileAttributeView(PosixFileAttributeView.class)
|
||||
* PosixFileAttributes attrs = file.getFileAttributeView(PosixFileAttributeView.class)
|
||||
* .readAttributes();
|
||||
* System.out.format("%s %s%n",
|
||||
* attrs.owner().getName(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user